--- MITgcm/tools/genmake2 2014/01/25 18:25:49 1.264 +++ MITgcm/tools/genmake2 2014/07/15 23:05:54 1.267 @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.264 2014/01/25 18:25:49 jmc Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.267 2014/07/15 23:05:54 heimbach Exp $ # $Name: $ # # Makefile generator for MITgcm UV codes @@ -1083,9 +1083,7 @@ } check_lapack_libs() { - if test ! "x$SKIP_LAPACK_CHECK" = x ; then - return - fi + if test "x$CHECK_FOR_LAPACK" = xf ; then return ; fi echo >> $LOGFILE echo "running: check_lapack_libs()" >> $LOGFILE cat < genmake_tla.F @@ -1281,8 +1279,8 @@ DEVEL= HAVE_TEST_L= -# comment this line out to enable lapack test -SKIP_LAPACK_CHECK=t +# set this to "t" to enable lapack test +CHECK_FOR_LAPACK=f # DEFINES checked by test compilation or command-line HAVE_SYSTEM= @@ -2633,7 +2631,7 @@ OAD_CB2M_FILES="/dev/null" OADTOOLS="$TOOLSDIR/OAD_support" echo " looking for dontCompile file: " - for i in "." $MODS ; do + for i in "." $MODS $OADTOOLS ; do if test -r $i"/dontCompile" ; then OAD_DONT_COMPILE=$i"/dontCompile" echo " found $OAD_DONT_COMPILE" @@ -2641,7 +2639,7 @@ fi done echo " looking for dontTransform file: " - for i in "." $MODS ; do + for i in "." $MODS $OADTOOLS ; do if test -r $i"/dontTransform" ; then OAD_DONT_TRANSFORM=$i"/dontTransform" echo " found $OAD_DONT_TRANSFORM" @@ -2649,7 +2647,7 @@ fi done echo " looking for keepOriginal file: " - for i in "." $MODS ; do + for i in "." $MODS $OADTOOLS ; do if test -r $i"/keepOriginal" ; then OAD_KEEP_ORIGINAL=$i"/keepOriginal" echo " found $OAD_KEEP_ORIGINAL" @@ -2657,7 +2655,7 @@ fi done echo " looking for cb2mFiles: " - for i in "." $MODS ; do + for i in "." $MODS $OADTOOLS ; do if test -r $i"/cb2mFiles" ; then OAD_CB2M_FILES=$i"/cb2mFiles" echo " found $OAD_CB2M_FILES" @@ -2973,10 +2971,6 @@ small_f: \$(F77_PP_SRC_FILES) \$(F90_PP_SRC_FILES) -output.txt: \$(EXECUTABLE) - @printf 'running ... ' - @\$(EXECUTABLE) > \$@ - # remove most of the files that "make" generates clean: -rm -rf *.p *.$FS90 *.mod ${RMFILES} work.{pc,pcl} *.template @@ -3255,6 +3249,7 @@ # ============ begin OpenAD specific section ============== cat >>$MAKEFILE <>$MAKEFILE < ad_config.template + @cmp ad_config.template AD_CONFIG.h || cat ad_config.template > AD_CONFIG.h + @-rm -f ad_config.template + \$(MAKE) -f \$(MAKEFILE) \$(EXE_AD) + CB2M_F90_PP_SRC_FILES=\$(addsuffix _mod.f$FS90, \$(CB2M_F90_SRC_NAMES)) .PRECIOUS: \$(CB2M_F90_PP_SRC_FILES) \$(NON_AD_F77_SRC_FILES:.F=_cb2m.f$FS90) @@ -3368,13 +3370,6 @@ small_f: \$(CB2M_F90_PP_SRC_FILES) .PHONY: small_f -ad_output.txt: \$(EXE_AD) - @printf 'linking data files ... ' - \$(LN) -f ../input_ad/data* ../input_ad/eedata . - \$(LN) -f ../../global_ocean.90x40x15/input/*.bin . - @printf 'running ... ' - @./\$(EXE_AD) > \$@ - ad_input_code.f$FS90: \$(CB2M_AD_FILES) cat \$^ > \$@