/[MITgcm]/MITgcm/tools/genmake2
ViewVC logotype

Diff of /MITgcm/tools/genmake2

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.46 by adcroft, Tue Nov 25 14:18:50 2003 UTC revision 1.51 by adcroft, Wed Dec 3 19:46:10 2003 UTC
# Line 1  Line 1 
1  #!/bin/sh  #! /usr/bin/env bash
2  #  #
3  # $Header$  # $Header$
4  #  #
# Line 586  for ac_option ; do Line 586  for ac_option ; do
586          -optfile=* | --optfile=* | -of=* | --of=*)          -optfile=* | --optfile=* | -of=* | --of=*)
587              OPTFILE=$ac_optarg ;;              OPTFILE=$ac_optarg ;;
588                    
589          -adoptfile | --adoptfile | -ad | --ad)          -adoptfile | --adoptfile | -adof | --adof)
590              ac_prev=AD_OPTFILE ;;              ac_prev=AD_OPTFILE ;;
591          -adoptfile=* | --adoptfile=* | -adof=* | --adof=*)          -adoptfile=* | --adoptfile=* | -adof=* | --adof=*)
592              AD_OPTFILE=$ac_optarg ;;              AD_OPTFILE=$ac_optarg ;;
# Line 1447  cat >>$MAKEFILE <<EOF Line 1447  cat >>$MAKEFILE <<EOF
1447  .SUFFIXES: .o .f .p .F .c .F90 .f90  .SUFFIXES: .o .f .p .F .c .F90 .f90
1448    
1449  all: \$(EXECUTABLE)  all: \$(EXECUTABLE)
1450  \$(EXECUTABLE): links \$(OBJFILES)  \$(EXECUTABLE): ${PACKAGES_DOT_H} AD_CONFIG.h \$(SRCFILES) \$(CSRCFILES) \$(HEADERFILES) \$(F90SRCFILES) \$(OBJFILES)
1451          @echo Creating \$@ ...          @echo Creating \$@ ...
1452          \$(LINK) -o \$@ \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) \$(LIBS)          \$(LINK) -o \$@ \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) \$(LIBS)
1453  depend:  depend:
# Line 1469  Clean: Line 1469  Clean:
1469          @make clean          @make clean
1470          @make cleanlinks          @make cleanlinks
1471          -rm -f ${PACKAGES_DOT_H} AD_CONFIG.h          -rm -f ${PACKAGES_DOT_H} AD_CONFIG.h
1472          -rm -f Makefile.bak genmake_state genmake_*optfile genmake_warnings make.log          -rm -f genmake_state genmake_*optfile genmake_warnings make.log run.log *.bak
1473  CLEAN:  CLEAN:
1474          @make Clean          @make Clean
1475          -find \$(EXEDIR) -name "*.meta" -exec rm {} \;          -find \$(EXEDIR) -name "*.meta" -exec rm {} \;
# Line 1486  cleanlinks: Line 1486  cleanlinks:
1486  # Special targets  # Special targets
1487  ${PACKAGES_DOT_H}:  ${PACKAGES_DOT_H}:
1488          @echo Creating \$@ ...          @echo Creating \$@ ...
1489          @\$(TOOLSDIR)/convert_cpp_cmd2defines "Warngin - this file is automatically generated - do NOT edit" -bPACKAGES_CONFIG_H "Disabled packages:" \$(DISABLED_PACKAGES) " " "Enabled packages:" \$(ENABLED_PACKAGES) > \$@          @\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -bPACKAGES_CONFIG_H "Disabled packages:" \$(DISABLED_PACKAGES) " " "Enabled packages:" \$(ENABLED_PACKAGES) > \$@
1490  AD_CONFIG.h:  AD_CONFIG.h:
1491          @echo Creating \$@ ...          @echo Creating \$@ ...
1492          @\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -bAD_CONFIG_H -UALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > \$@          @\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -bAD_CONFIG_H -UALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > \$@
# Line 1549  adall: ad_taf Line 1549  adall: ad_taf
1549  adtaf: ad_taf_output.f  adtaf: ad_taf_output.f
1550  adtamc: ad_tamc_output.f  adtamc: ad_tamc_output.f
1551    
1552  ad_input_code.f: links \$(AD_FILES) \$(HEADERFILES)  ad_input_code.f: \$(AD_FILES) \$(HEADERFILES)
1553          @\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -DALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > ad_config.template          @\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -DALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > ad_config.template
1554          cmp ad_config.template AD_CONFIG.h || cat ad_config.template > AD_CONFIG.h          cmp ad_config.template AD_CONFIG.h || cat ad_config.template > AD_CONFIG.h
1555          -rm -f ad_config.template          -rm -f ad_config.template
# Line 1581  ftlall: ftl_taf Line 1581  ftlall: ftl_taf
1581  ftltaf: ftl_taf_output.f  ftltaf: ftl_taf_output.f
1582  ftltamc: ftl_tamc_output.f  ftltamc: ftl_tamc_output.f
1583    
1584  ftl_input_code.f: links \$(AD_FILES) \$(HEADERFILES)  ftl_input_code.f: \$(AD_FILES) \$(HEADERFILES)
1585          @\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -UALLOW_ADJOINT_RUN -DALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > ftl_config.template          @\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -UALLOW_ADJOINT_RUN -DALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > ftl_config.template
1586          cmp ftl_config.template AD_CONFIG.h || cat ftl_config.template > AD_CONFIG.h          cmp ftl_config.template AD_CONFIG.h || cat ftl_config.template > AD_CONFIG.h
1587          -rm -f ftl_config.template          -rm -f ftl_config.template
# Line 1654  printf "\n\n# DO NOT DELETE\n" >> $MAKEF Line 1654  printf "\n\n# DO NOT DELETE\n" >> $MAKEF
1654    
1655  printf "\n===  Done  ===\n"  printf "\n===  Done  ===\n"
1656    
1657    # Create special header files
1658    $TOOLSDIR/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -bPACKAGES_CONFIG_H "Disabled packages:" $DISABLED_PACKAGES " " "Enabled packages:" $ENABLED_PACKAGES > $PACKAGES_DOT_H".tmp"
1659    if test ! -f $PACKAGES_DOT_H ; then
1660        mv -f $PACKAGES_DOT_H".tmp" $PACKAGES_DOT_H
1661    else
1662        cmp $PACKAGES_DOT_H".tmp" $PACKAGES_DOT_H
1663        RETVAL=$?
1664        if test "x$RETVAL" = x0 ; then
1665            rm -f $PACKAGES_DOT_H".tmp"
1666        else
1667            mv -f $PACKAGES_DOT_H $PACKAGES_DOT_H".bak"
1668            mv -f $PACKAGES_DOT_H".tmp" $PACKAGES_DOT_H
1669        fi
1670    fi
1671    if test ! -f AD_CONFIG.h ; then
1672        $TOOLSDIR/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -UALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > AD_CONFIG.h
1673    fi
1674    
1675    
1676  #  Write the "state" for future records  #  Write the "state" for future records
1677  if test "x$DUMPSTATE" != xf ; then  if test "x$DUMPSTATE" != xf ; then

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.51

  ViewVC Help
Powered by ViewVC 1.1.22