Bad permissions on files copied to the SIM directory

Changed the commands to force the copy files in the the SIM directory
from "cp" to "cp -f".   Added a rule in Makefile.sim to properly
call the configuration processor if the build directory is missing.
Also added a loop to filter the files found to be in an external
library.  Those files need to be tested to see if they include ICG: (No)

refs #156
This commit is contained in:
Alex Lin 2015-12-15 15:05:13 -06:00
parent ff39984568
commit 9daa108950
2 changed files with 14 additions and 5 deletions

View File

@ -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 = <FILE> ;
my @unfiltered_ext_lib_files = <FILE> ;
@unfiltered_ext_lib_files = <FILE> ;
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" ;

View File

@ -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 $?