/* All targets are listed here - 1st one is the default */ [PRIMARY_TARGET][E]: [obj_files]; /* build PRIMARY_TARGET */ install: { mv [PRIMARY_TARGET][E] [BIN]; } /* currently the "print" targets work only for Unix */ print: print_src print_inc /* default "print" target */ print_src: /* print all PRIMARY_TARGET Fortran code */ { a2ps -d [src_files]; } print_inc: /* print all PRIMARY_TARGET Fortran include files */ { a2ps -d [inc_files]; } clean: /* get all those intermediate files */ { rm -f [BIN]/[PRIMARY_TARGET][E] [PRIMARY_TARGET][E] [obj_files] set clearstat; } clobber: clean /* get those "dependency" files as well */ { rm -f [dep_files] set clearstat; } testing0: /* echo a few variables to the screen for debugging */ { echo I am here in the testing recipe.; echo "os machine is: " [os machine]; echo "WEPS_COMPILER is: " [getenv WEPS_COMPILER]; echo "WEPS_BIN directory is: " [WEPS_BIN]; echo "BIN directory is: " [BIN]; echo "WEPS_INC directory is: " [WEPS_INC]; echo "INC directory is: " [INC]; echo "Fortran source files extension is: " [F]; } testing1: /* echo a few variables to the screen for debugging */ { echo "subdirs is: " [subdirs]; echo "subdirs_src is: " [subdirs_src]; echo "subdirs_obj is: " [subdirs_obj]; echo "subdirs_lib is: " [subdirs_lib]; echo "fortran_dep_files are: " [fortran_dep_files]; echo "BIN/[PRIMARY_TARGET][E]_obj is: " [BIN]/[PRIMARY_TARGET][E]_obj; echo "bin/[PRIMARY_TARGET][E]_obj is: " [[BIN]/[PRIMARY_TARGET][E]_obj]; } testing2: { /* echo "target_obj is: " [target]_obj]; */ echo name [downcase [PRIMARY_TARGET][E]] > link.wcm; echo file [subst \\ \\\\ [dos-path [[PRIMARY_TARGET][E]_obj]]] >> link.wcm; /* echo file [[PRIMARY_TARGET][E]_obj] >>! link.wcm; */ } ToUnix: /* remove CR from all *.for, *.inc, *.fi and *.d files */ { /* Should be careful as it could remove all of our files */ /* if this is modified incorrectly! */ tmp_files = [src_files] [inc_files]; loop { t_file = [firstword [tmp_files]]; if [not [t_file]] then loopstop; tmp_files = [tail [tmp_files]]; sed -f cookbook/stripCR.sed < [t_file] > xx.tmp; /* cmp -s returns a non zero value if the files were different */ if [ not [execute cmp -s [t_file] xx.tmp ]] then mv xx.tmp [t_file]; } unlink xx.tmp; } ToUnix2: /* remove CR from all *.for, *.inc, *.fi and *.d files */ { /* Should be careful as it could remove all of our files */ /* if this is modified incorrectly! */ tmp_files = [src_files] [inc_files] [dep_files]; loop { t_file = [firstword [tmp_files]]; if [not [t_file]] then loopstop; tmp_files = [tail [tmp_files]]; tr -d "\r" < [t_file] >! xx.tmp; /* cmp -s returns a non zero value if the files were different */ if [ not [execute cmp -s [t_file] xx.tmp ]] then mv xx.tmp [t_file]; } unlink xx.tmp; }