diff --git a/libexec/trick/make_makefile_swig b/libexec/trick/make_makefile_swig index 50cf32a9..cc05f7e1 100755 --- a/libexec/trick/make_makefile_swig +++ b/libexec/trick/make_makefile_swig @@ -116,9 +116,18 @@ sub read_files_to_process() { } open FILE, "build/ICG_ext_lib" or die 'could not open build/ICG_ext_lib' ; - @ext_lib_files = ; + my @unfiltered_ext_lib_files = ; + @unfiltered_ext_lib_files = ; close FILE ; - chomp @ext_lib_files ; + chomp @unfiltered_ext_lib_files ; + + foreach my $e ( @unfiltered_ext_lib_files ) { + $e = abs_path(dirname($e)) . "/" . basename($e) ; + if ( exists $compiler_file_list{$e} ) { + push @ext_lib_files , $e ; + } + } + } sub make_swig_makefile() { @@ -289,7 +298,7 @@ LINK_OBJECTS += \$(SWIG_MODULE_OBJECTS) print MAKEFILE "S_main: \$(TRICK_FIXED_PYTHON)\n\n" ; print MAKEFILE "\$(TRICK_FIXED_PYTHON) : $swig_sim_dir/\% : \${TRICK_HOME}/share/trick/swig/\%\n" ; - print MAKEFILE "\t\$(ECHO_CMD)/bin/cp \$< \$@\n\n" ; + print MAKEFILE "\t\$(ECHO_CMD)/bin/cp -f \$< \$@\n\n" ; foreach (keys %swig_dirs) { print MAKEFILE "$_:\n" ; diff --git a/share/trick/makefiles/Makefile.sim b/share/trick/makefiles/Makefile.sim index 4b01aebe..849cfa32 100644 --- a/share/trick/makefiles/Makefile.sim +++ b/share/trick/makefiles/Makefile.sim @@ -45,7 +45,7 @@ ${TRICK_LIB_DIR}/libtrick.a: @exit -1 # CP creates S_source.hh required for ICG and SWIG processing -S_source.hh : S_define | build +S_source.hh $(CURDIR)/build/S_define.lib_deps : S_define | build $(PRINT_CP) $(ECHO_CMD)${TRICK_HOME}/$(LIBEXEC)/trick/configuration_processor $(TRICK_CPFLAGS) @@ -68,7 +68,7 @@ $(CURDIR)/build/S_define.deps : $(ECHO_CMD)$(TRICK_CPPC) $(TRICK_SFLAGS) $(TRICK_SYSTEM_SFLAGS) -M -MT S_source.hh -MF build/S_define.deps -x c++ S_define # Create makefile for source code -$(CURDIR)/build/Makefile_src: | $(CURDIR)/build/Makefile_io_src +$(CURDIR)/build/Makefile_src: | $(CURDIR)/build/Makefile_io_src $(CURDIR)/build/S_define.lib_deps $(PRINT_MAKEFILE_SRC) $(ECHO_CMD)${TRICK_HOME}/$(LIBEXEC)/trick/make_makefile_src $?