From 9c6dfed624206c9ab9788fc82c0f6b86e07930b1 Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Tue, 30 Jun 2015 11:01:30 -0500 Subject: [PATCH] SWIG files in model libraries not being init'ed Found that we need to add python files to lists of expected modules before testing if they are being excluded. Moved the check to exclude to after adding the files to the list. This may have uninteded consequences. Might have to revisit using different mechanism to exclude files and mark files as expected from libraries. refs #74 --- libexec/trick/pm/make_swig_makefile.pm | 22 +++++++++++----------- share/trick/makefiles/Makefile.common | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libexec/trick/pm/make_swig_makefile.pm b/libexec/trick/pm/make_swig_makefile.pm index d6796a80..c681f4c7 100644 --- a/libexec/trick/pm/make_swig_makefile.pm +++ b/libexec/trick/pm/make_swig_makefile.pm @@ -288,17 +288,6 @@ sub make_swig_makefile($$$) { $ii = 0 ; foreach my $f ( @temp_array2 ) { - my ($continue) = 1 ; - foreach my $ie ( @exclude_dirs ) { - # if file location begins with $ie (an IGC exclude dir) - if ( $f =~ /^\Q$ie/ ) { - $continue = 0 ; - $ii++ ; - last ; # break out of loop - } - } - next if ( $continue == 0 ) ; - my ($swig_dir, $swig_object_dir , $swig_module_dir , $swig_file_only) ; my ($swig_f) = $f ; @@ -315,6 +304,17 @@ sub make_swig_makefile($$$) { push @{$python_modules{"root"}} , $f ; } + my ($continue) = 1 ; + foreach my $ie ( @exclude_dirs ) { + # if file location begins with $ie (an IGC exclude dir) + if ( $f =~ /^\Q$ie/ ) { + $continue = 0 ; + $ii++ ; + last ; # break out of loop + } + } + next if ( $continue == 0 ) ; + my $md5_sum = md5_hex($f) ; # check if .sm file was accidentally ##included instead of #included if ( rindex($swig_f,".sm") != -1 ) { diff --git a/share/trick/makefiles/Makefile.common b/share/trick/makefiles/Makefile.common index 157fe9e0..6e5ea447 100644 --- a/share/trick/makefiles/Makefile.common +++ b/share/trick/makefiles/Makefile.common @@ -38,7 +38,7 @@ export TRICK_SWIG_EXCLUDE export TRICK_GTE_EXT export TRICK_HOST_CPU := $(shell export TRICK_CC=$(TRICK_CC) && $(TRICK_HOME)/bin/trick-gte TRICK_HOST_CPU) export TRICK_EXEC_LINK_LIBS = ${PTHREAD_LIBS} $(PYTHON_LIB) -export TRICK_LIBS := ${RPATH} -L${TRICK_LIB_DIR} -ltrick -ltrick_pyip -ltrick_comm -ltrick_math -ltrick_units +export TRICK_LIBS = ${RPATH} -L${TRICK_LIB_DIR} -ltrick -ltrick_pyip -ltrick_comm -ltrick_math -ltrick_units IO_SRC_DIR := io_src/ OBJ_DIR := object_${TRICK_HOST_CPU}