--- MITgcm/tools/genmake2 2003/10/23 04:41:41 1.22 +++ MITgcm/tools/genmake2 2003/10/24 05:52:05 1.23 @@ -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.23 2003/10/24 05:52:05 edhill Exp $ # # Makefile generator for MITgcm UV codes # created by cnh 03/98 @@ -1364,16 +1364,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: \$(SRCFILES) \$(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 +1391,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 + 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 +1421,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 +1473,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 <