--- MITgcm/tools/genmake2 2003/10/23 04:41:41 1.22 +++ MITgcm/tools/genmake2 2003/10/30 19:11:45 1.26 @@ -1,6 +1,6 @@ #!/bin/bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.22 2003/10/23 04:41:41 edhill Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.26 2003/10/30 19:11:45 heimbach Exp $ # # Makefile generator for MITgcm UV codes # created by cnh 03/98 @@ -72,7 +72,8 @@ tmp1=`uname`"_"`uname -m` tmp2=`echo $tmp1 | sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` - PLATFORM=`echo $tmp2 | sed -e 's/i[3-6]86/ia32/' | sed -e 's/athlon/ia32/'` + tmp3=`echo $tmp2 | sed -e 's/power macintosh/ppc/'` + PLATFORM=`echo $tmp3 | sed -e 's/i[3-6]86/ia32/' | sed -e 's/athlon/ia32/'` OFLIST=`(cd $ROOTDIR/tools/build_options; ls | grep "^$PLATFORM")` echo " The platform appears to be: $PLATFORM" # if test "x$OFLIST" = x ; then @@ -104,7 +105,7 @@ fi # look for possible fortran compilers - tmp="$MITGCM_FC $FC g77 f77 pgf77 pgf95 ifc f90 f95 mpif77 mpf77 mpxlf95" + tmp="$MITGCM_FC $FC efc g77 f77 pgf77 pgf95 ifc f90 f95 mpif77 mpf77 mpxlf95" p_FC= for c in $tmp ; do rm -f ./hello.f ./hello @@ -1364,16 +1365,13 @@ cat >>$MAKEFILE < AD_CONFIG.h - # ... AD ... -ad: ad_taf -ad_taf_f: ad_taf_output.f -ad_tamc_f: ad_tamc_output.f +adall: ad_taf +adtaf: ad_taf_output.f +adtamc: ad_tamc_output.f -ad_input_code.f: \$(SRCFILES) - cat ad_config.template > AD_CONFIG.h +ad_input_code.f: \$(AD_FILES) \$(HEADERFILES) + cmp ad_config.template AD_CONFIG.h || cat ad_config.template > AD_CONFIG.h @make \$(F77FILES) @make \$(AD_FLOW_FILES) cat \$(AD_FLOW_FILES) \$(AD_FILES) > ad_input_code.f @@ -1394,12 +1392,13 @@ # ... FTL ... -ftl: ftl_taf -ftl_taf_f: ftl_taf_output.f -ftl_tamc_f: ftl_tamc_output.f +ftlall: ftl_taf +ftltaf: ftl_taf_output.f +ftltamc: ftl_tamc_output.f -ftl_input_code.f: \$(SRCFILES) - cat ftl_config.template > AD_CONFIG.h +ftl_input_code.f: \$(AD_FILES) \$(HEADERFILES) + cmp ftl_config.template AD_CONFIG.h || cat ftl_config.template > AD_CONFIG.h + @make \$(F77FILES) @make \$(AD_FLOW_FILES) cat \$(AD_FLOW_FILES) \$(AD_FILES) > ftl_input_code.f @@ -1423,7 +1422,8 @@ svd_taf_f: svd_taf_output.f svd_input_code.f: \$(SRCFILES) - cat svd_config.template > AD_CONFIG.h + cmp svd_config.template AD_CONFIG.h || cat svd_config.template > AD_CONFIG.h + @make \$(F77FILES) @make \$(AD_FLOW_FILES) cat \$(AD_FLOW_FILES) \$(AD_FILES) > svd_input_code.f @@ -1474,37 +1474,37 @@ printf "\n=== Done ===\n" # Write the "template" files for the adjoint builds -cat >>AD_CONFIG.template <AD_CONFIG.template <>ad_config.template <ad_config.template <>ftl_config.template <ftl_config.template <>svd_config.template <svd_config.template <