/[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.223 by jmc, Wed Aug 10 19:39:35 2011 UTC revision 1.228 by jmc, Tue Jan 17 22:55:39 2012 UTC
# Line 297  EOF Line 297  EOF
297  .F.$tfs:  .F.$tfs:
298          $LN \$< \$@          $LN \$< \$@
299  EOF  EOF
300      $MAKE "genmake_hello."$tfs > /dev/null 2>&1      $MAKE -f $MAKEFILE "genmake_hello."$tfs > /dev/null 2>&1
301      RETVAL=$?      RETVAL=$?
302      if test "x$RETVAL" != x0 -o ! -f "genmake_hello."$tfs ; then      if test "x$RETVAL" != x0 -o ! -f "genmake_hello."$tfs ; then
303          if test "x$FS" = x ; then          if test "x$FS" = x ; then
# Line 1522  EOF Line 1522  EOF
1522  fi  fi
1523  if test "x$GET_FC_VERSION" != x ; then  if test "x$GET_FC_VERSION" != x ; then
1524    echo "Get compiler version using: $FC $GET_FC_VERSION" >> $LOGFILE    echo "Get compiler version using: $FC $GET_FC_VERSION" >> $LOGFILE
1525    $FC $GET_FC_VERSION >> $LOGFILE 2> /dev/null    ff=`echo $FC | sed 's/ .*//'` ; xx=`echo $ff | sed 's/^./& /' | sed 's/ .*//'`
1526      if test $xx != '/' ; then which $ff >> $LOGFILE ; fi
1527      $FC $GET_FC_VERSION > genmake_fc_vers1 2> genmake_fc_vers2
1528      if test -s genmake_fc_vers1 ; then
1529        cat genmake_fc_vers1 >> $LOGFILE
1530      else
1531        cat genmake_fc_vers2 >> $LOGFILE
1532      fi
1533    echo "<-- compiler version ----" >> $LOGFILE    echo "<-- compiler version ----" >> $LOGFILE
1534      rm -f genmake_fc_vers1 genmake_fc_vers2
1535  fi  fi
1536    
1537  if test "x$CC" = x ; then  if test "x$CC" = x ; then
# Line 2650  NOOPTFILES = ${NOOPTFILES} Line 2658  NOOPTFILES = ${NOOPTFILES}
2658  NOOPTFLAGS = ${NOOPTFLAGS}  NOOPTFLAGS = ${NOOPTFLAGS}
2659  # Flags and libraries needed for linking  # Flags and libraries needed for linking
2660  LIBS = ${LIBS}  LIBS = ${LIBS}
2661  # Name of the Mekfile  # Name of the makefile
2662  MAKEFILE=${MAKEFILE}  MAKEFILE=${MAKEFILE}
2663    
2664  EOF  EOF
# Line 2688  all: \$(EXECUTABLE) Line 2696  all: \$(EXECUTABLE)
2696          \$(LINK) -o \$@ \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) \$(LIBS)          \$(LINK) -o \$@ \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) \$(LIBS)
2697    
2698  depend:  depend:
2699          @make links          @make -f \$(MAKEFILE) links
2700          \$(MAKEDEPEND) -o .$FS \$(DEFINES) \$(INCLUDES) \$(F77_SRC_FILES)          \$(MAKEDEPEND) -o .$FS \$(DEFINES) \$(INCLUDES) \$(F77_SRC_FILES)
2701          \$(TOOLSDIR)/f90mkdepend >> \$(MAKEFILE)          \$(TOOLSDIR)/f90mkdepend >> \$(MAKEFILE)
2702          -rm -f makedepend.out          -rm -f makedepend.out
# Line 2718  clean: Line 2726  clean:
2726    
2727  # remove most of the files that "make" and "make depend" generate  # remove most of the files that "make" and "make depend" generate
2728  Clean:  Clean:
2729          @make clean          @make -f \$(MAKEFILE) clean
2730          @make cleanlinks          @make -f \$(MAKEFILE) cleanlinks
2731          -rm -f \$(SPECIAL_FILES) f90mkdepend.log $MAKEFILE.old          -rm -f \$(SPECIAL_FILES) f90mkdepend.log $MAKEFILE.old
2732          -rm -f taf_command taf_output taf_ad.log taf_ad_flow.log          -rm -f taf_command taf_output taf_ad.log taf_ad_flow.log
2733          -rm -f genmake_warnings genmake_errors make.log          -rm -f genmake_warnings genmake_errors make.log
# Line 2727  Clean: Line 2735  Clean:
2735  # remove also the executable, files that "genmake2" generates (except Makefile)  # remove also the executable, files that "genmake2" generates (except Makefile)
2736  #         and output from a run (plus log files from testreport)  #         and output from a run (plus log files from testreport)
2737  CLEAN:  CLEAN:
2738          @make Clean          @make -f \$(MAKEFILE) Clean
2739          -rm -f \$(EXECUTABLE) \$(EXE_AD) *.bak          -rm -f \$(EXECUTABLE) \$(EXE_AD) *.bak
2740          -rm -f $LOGFILE genmake_state genmake_*optfile          -rm -f $LOGFILE genmake_state genmake_*optfile
2741          -rm -f SIZE.h.mpi genmake.tr_log make.tr_log          -rm -f SIZE.h.mpi genmake.tr_log make.tr_log
# Line 2866  ad_input_code.$FS: \$(AD_FILES) \$(H_SRC Line 2874  ad_input_code.$FS: \$(AD_FILES) \$(H_SRC
2874          @$BASH\$(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          @$BASH\$(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
2875          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
2876          -rm -f ad_config.template          -rm -f ad_config.template
2877          @make \$(F77_PP_SRC_FILES)          @make -f \$(MAKEFILE) \$(F77_PP_SRC_FILES)
2878          @make \$(FLOFILES)          @make -f \$(MAKEFILE) \$(FLOFILES)
2879          cat \$(FLOFILES) \$(AD_FILES) | sed -f \$(TOOLSDIR)/remove_comments_sed > ad_input_code.$FS          cat \$(FLOFILES) \$(AD_FILES) | sed -f \$(TOOLSDIR)/remove_comments_sed > ad_input_code.$FS
2880    
2881  ad_taf_output.$FS: ad_input_code.$FS  ad_taf_output.$FS: ad_input_code.$FS
# Line 2896  adonlyfwd: Line 2904  adonlyfwd:
2904  adtrick:  adtrick:
2905          patch < \$(TOOLSDIR)/ad_taf_output.f.adtrick.diff          patch < \$(TOOLSDIR)/ad_taf_output.f.adtrick.diff
2906    
2907    adobj: ad_taf_output.o \$(OBJFILES)
2908    
2909  # ... FTL ...  # ... FTL ...
2910  ftlall: ftl_taf  ftlall: ftl_taf
2911  ftltaf: ftl_taf_output.$FS  ftltaf: ftl_taf_output.$FS
# Line 2905  ftl_input_code.$FS: \$(AD_FILES) \$(H_SR Line 2915  ftl_input_code.$FS: \$(AD_FILES) \$(H_SR
2915          @$BASH\$(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          @$BASH\$(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
2916          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
2917          -rm -f ftl_config.template          -rm -f ftl_config.template
2918          @make \$(F77_PP_SRC_FILES)          @make -f \$(MAKEFILE) \$(F77_PP_SRC_FILES)
2919          @make \$(AD_FLOW_FILES)          @make -f \$(MAKEFILE) \$(AD_FLOW_FILES)
2920          cat \$(AD_FLOW_FILES) \$(AD_FILES) > ftl_input_code.$FS          cat \$(AD_FLOW_FILES) \$(AD_FILES) > ftl_input_code.$FS
2921    
2922  ftl_taf_output.$FS: ftl_input_code.$FS  ftl_taf_output.$FS: ftl_input_code.$FS
# Line 3165  postProcess.tag: ad_input_code_sf.w2f.pr Line 3175  postProcess.tag: ad_input_code_sf.w2f.pr
3175          # this step also creates the file postProcess.make but we cannot          # this step also creates the file postProcess.make but we cannot
3176          # name it as the target or else make will try to remake it for          # name it as the target or else make will try to remake it for
3177          # the include directive above for any rule, e.g. make clean          # the include directive above for any rule, e.g. make clean
3178          ./postProcess.py --progress --timing --outputFormat=fixed -m r -i ../OAD_support/ad_inline.f --width 4 \$<          ./postProcess.py --progress --timing --infoUnitFile w2f__types.f90 --outputFormat=fixed -m r -i ../OAD_support/ad_inline.f --width 4 \$<
3179    
3180  # setup some links  # setup some links
3181  %.xsd:  %.xsd:

Legend:
Removed from v.1.223  
changed lines
  Added in v.1.228

  ViewVC Help
Powered by ViewVC 1.1.22