/[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.254 by heimbach, Wed Aug 7 16:20:03 2013 UTC revision 1.259 by jahn, Tue Aug 20 17:27:03 2013 UTC
# Line 2703  for d in $alldirs ; do Line 2703  for d in $alldirs ; do
2703                        F)                        F)
2704                          echo    " \\"  >> F77srclist.tmp                          echo    " \\"  >> F77srclist.tmp
2705                          printf " $sf" >> F77srclist.tmp                          printf " $sf" >> F77srclist.tmp
2706                          if test "x$OPENAD" != x ; then                          if test "x$OPENAD" = x ; then
2707                                basename=${sf%%.F}
2708                                isAD=`egrep ^$basename.f'[  ]*' adSrcFiles.tmp`
2709                                if test -z "$isAD" ; then
2710                                    echo    " \\"  >> nonADF77srclist.tmp
2711                                    printf " $sf" >> nonADF77srclist.tmp
2712                                fi
2713                            else #- OpenAD case:
2714                              basename=${sf%%.F}                              basename=${sf%%.F}
2715                              isAD=`egrep ^$basename.f'[  ]*' adSrcFiles.tmp`                              isAD=`egrep ^$basename.f'[  ]*' adSrcFiles.tmp`
2716                              if test -z "$isAD" ; then                              if test -z "$isAD" ; then
# Line 3118  ad_exe_target: Line 3125  ad_exe_target:
3125          @-rm -f ad_config.template          @-rm -f ad_config.template
3126          \$(MAKE) -f \$(MAKEFILE) \$(EXE_AD)          \$(MAKE) -f \$(MAKEFILE) \$(EXE_AD)
3127    
3128  ad_input_code.$FS: \$(F77_SRC_FILES) \$(AD_FLOW_FILES)  ad_input_code.$FS: \$(AD_FILES) \$(AD_FLOW_FILES)
3129          @$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Adjoint version" -bAD_CONFIG_H -DALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN > ad_config.template          @$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Adjoint version" -bAD_CONFIG_H -DALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN > ad_config.template
3130          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
3131          @-rm -f ad_config.template          @-rm -f ad_config.template
3132          @\$(MAKE) -f \$(MAKEFILE) \$(F77_PP_SRC_FILES)          @\$(MAKE) -f \$(MAKEFILE) \$(F77_PP_SRC_FILES)
3133          @\$(MAKE) -f \$(MAKEFILE) \$(FLOWFILES)          @\$(MAKE) -f \$(MAKEFILE) \$(FLOWFILES)
3134          cat \$(FLOWFILES) \$(F77_PP_SRC_FILES) | sed -f \$(TOOLSDIR)/remove_comments_sed > ad_input_code.$FS          cat \$(FLOWFILES) \$(AD_FILES) | sed -f \$(TOOLSDIR)/remove_comments_sed > ad_input_code.$FS
3135    
3136  ad_taf_output.$FS: ad_input_code.$FS  ad_taf_output.$FS: ad_input_code.$FS
3137            @-rm -f ad_input_code_ad.$FS
3138          \$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.$FS          \$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.$FS
3139          ls -l ad_input_code_ad.$FS          ls -l ad_input_code_ad.$FS
3140          cat ad_input_code_ad.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ad_taf_output.$FS          cat ad_input_code_ad.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ad_taf_output.$FS
# Line 3136  adtafonly: Line 3144  adtafonly:
3144          ls -l ad_input_code_ad.$FS          ls -l ad_input_code_ad.$FS
3145          cat ad_input_code_ad.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ad_taf_output.$FS          cat ad_input_code_ad.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ad_taf_output.$FS
3146    
3147  \$(EXE_AD): \$(SPECIAL_FILES) \$(F77_SRC_FILES) \$(C_SRC_FILES:.c=.o) \$(H_SRC_FILES) \$(F90_SRC_FILES) ad_taf_output.o \$(EMBEDDED_FILES)  \$(EXE_AD): \$(SPECIAL_FILES) \$(H_SRC_FILES) ad_taf_output.o \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) \$(EMBEDDED_FILES)
3148          \$(LINK) -o \${EXE_AD} \$(FFLAGS) \$(FOPTIM) \$(C_SRC_FILES:.c=.o) ad_taf_output.o \$(LIBS)          \$(LINK) -o \${EXE_AD} \$(FFLAGS) \$(FOPTIM) ad_taf_output.o \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) \$(LIBS)
3149    
3150  ad_tamc_output.$FS: ad_input_code.$FS  ad_tamc_output.$FS: ad_input_code.$FS
3151          \$(TAMC) \$(AD_TAMC_FLAGS) \$(TAMC_EXTRA) ad_input_code.$FS          \$(TAMC) \$(AD_TAMC_FLAGS) \$(TAMC_EXTRA) ad_input_code.$FS
# Line 3152  adonlyfwd: Line 3160  adonlyfwd:
3160  adtrick:  adtrick:
3161          patch < \$(TOOLSDIR)/ad_taf_output.f.adtrick.diff          patch < \$(TOOLSDIR)/ad_taf_output.f.adtrick.diff
3162    
3163  adobj: ad_taf_output.o \$(OBJFILES)  adobj: ad_taf_output.o \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o)
3164    
3165  # ... FTL ...  # ... FTL ...
3166  ftlall: ftl_exe_target  ftlall: ftl_exe_target
# Line 3166  ftl_exe_target: Line 3174  ftl_exe_target:
3174          @-rm -f ad_config.template          @-rm -f ad_config.template
3175          \$(MAKE) -f \$(MAKEFILE) \$(EXE_FTL)          \$(MAKE) -f \$(MAKEFILE) \$(EXE_FTL)
3176    
3177  ftl_input_code.$FS: \$(F77_SRC_FILES)  ftl_input_code.$FS: \$(AD_FILES)
3178          @$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "TangLin version" -bAD_CONFIG_H -UALLOW_ADJOINT_RUN -DALLOW_TANGENTLINEAR_RUN > ad_config.template          @$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "TangLin version" -bAD_CONFIG_H -UALLOW_ADJOINT_RUN -DALLOW_TANGENTLINEAR_RUN > ad_config.template
3179          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
3180          @-rm -f ad_config.template          @-rm -f ad_config.template
3181          @\$(MAKE) -f \$(MAKEFILE) \$(F77_PP_SRC_FILES)          @\$(MAKE) -f \$(MAKEFILE) \$(F77_PP_SRC_FILES)
3182          @\$(MAKE) -f \$(MAKEFILE) \$(AD_FLOW_FILES)          @\$(MAKE) -f \$(MAKEFILE) \$(AD_FLOW_FILES)
3183          cat \$(AD_FLOW_FILES) \$(F77_PP_SRC_FILES) | sed -f \$(TOOLSDIR)/remove_comments_sed > ftl_input_code.$FS          cat \$(AD_FLOW_FILES) \$(AD_FILES) | sed -f \$(TOOLSDIR)/remove_comments_sed > ftl_input_code.$FS
3184    
3185  ftl_taf_output.$FS: ftl_input_code.$FS  ftl_taf_output.$FS: ftl_input_code.$FS
3186            @-rm -f ftl_input_code_tl.$FS
3187          \$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.$FS          \$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.$FS
3188          ls -l ftl_input_code_tl.$FS          ls -l ftl_input_code_tl.$FS
3189          cat ftl_input_code_tl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.$FS          cat ftl_input_code_tl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.$FS
# Line 3184  ftltafonly: Line 3193  ftltafonly:
3193          ls -l ftl_input_code_tl.$FS          ls -l ftl_input_code_tl.$FS
3194          cat ftl_input_code_tl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.$FS          cat ftl_input_code_tl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.$FS
3195    
3196  \$(EXE_FTL): ftl_taf_output.o \$(C_SRC_FILES:.c=.o)  \$(EXE_FTL): \$(SPECIAL_FILES) \$(H_SRC_FILES) ftl_taf_output.o \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) \$(EMBEDDED_FILES)
3197          \$(LINK) -o \${EXE_FTL} \$(FFLAGS) \$(FOPTIM) \$(C_SRC_FILES:.c=.o) ftl_taf_output.o \$(LIBS)          \$(LINK) -o \${EXE_FTL} \$(FFLAGS) \$(FOPTIM) ftl_taf_output.o \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) \$(LIBS)
3198    
3199  ftl_tamc_output.$FS: ftl_input_code.$FS  ftl_tamc_output.$FS: ftl_input_code.$FS
3200          \$(TAMC) \$(FTL_TAMC_FLAGS) \$(TAMC_EXTRA) ftl_input_code.$FS          \$(TAMC) \$(FTL_TAMC_FLAGS) \$(TAMC_EXTRA) ftl_input_code.$FS
# Line 3384  ad_input_code_sf.pre.s2p.xb.x2w.w2f.f$FS Line 3393  ad_input_code_sf.pre.s2p.xb.x2w.w2f.f$FS
3393  ad_input_code_sf.pre.s2p.xb.x2w.w2f.td.f$FS90: ad_input_code_sf.pre.s2p.xb.x2w.w2f.f$FS90 \${OADTOOLS}/insertTemplateDir.bash  ad_input_code_sf.pre.s2p.xb.x2w.w2f.td.f$FS90: ad_input_code_sf.pre.s2p.xb.x2w.w2f.f$FS90 \${OADTOOLS}/insertTemplateDir.bash
3394          \${OADTOOLS}/insertTemplateDir.bash \$< \$@          \${OADTOOLS}/insertTemplateDir.bash \$< \$@
3395    
3396  PPEXTRAS=\$(wildcard \${OADTOOLS}/ad_template.*.F) \${OADTOOLS}/ad_inline.F  PPEXTRAS=\$(notdir \$(wildcard \${OADTOOLS}/ad_template.*.F)) ad_inline.F
3397  # postprocess F'  # postprocess F'
3398  postProcess.tag: ad_input_code_sf.pre.s2p.xb.x2w.w2f.td.f$FS90 \$(PPEXTRAS:.F=.f) | w2f__types.f90  postProcess.tag: ad_input_code_sf.pre.s2p.xb.x2w.w2f.td.f$FS90 \$(PPEXTRAS:.F=.f) | w2f__types.f90
3399          \${OPENADFORTTK_BASE}/tools/SourceProcessing/postProcess.py --progress --timing --infoUnitFile w2f__types.f90 --outputFormat=fixed --separateOutput --pathSuffix "" --filenameSuffix "_oad" -m r -i \${OADTOOLS}/ad_inline.f \$<          \${OPENADFORTTK_BASE}/tools/SourceProcessing/postProcess.py --progress --timing --infoUnitFile w2f__types.f90 --outputFormat=fixed --separateOutput --pathSuffix "" --filenameSuffix "_oad" -m r -i ad_inline.f \$<
3400          # the target is a placeholder to trigger a single execution of the rule          # the target is a placeholder to trigger a single execution of the rule
3401          touch \$@          touch \$@
3402  # put this so make knows about the postprocessing output  # put this so make knows about the postprocessing output
# Line 3398  OAD_intrinsics_oad.f \$(CB2M_AD_FILES:.f Line 3407  OAD_intrinsics_oad.f \$(CB2M_AD_FILES:.f
3407          \$(LN) \${XAIFSCHEMAROOT}/schema/\$@ .          \$(LN) \${XAIFSCHEMAROOT}/schema/\$@ .
3408    
3409  # link the support files:  # link the support files:
3410  \$(OPENAD_SUPPORT_F90_SRC_FILES) \$(OPENAD_SUPPORT_C_SRC_FILES):  \$(OPENAD_SUPPORT_F90_SRC_FILES) \$(OPENAD_SUPPORT_C_SRC_FILES) \$(PPEXTRAS):
3411          \$(LN) \${OADTOOLS}/\$@ .          \$(LN) \${OADTOOLS}/\$@ .
3412    
3413  AD_CLEAN += *_mod.h *_mod.F90 *.FF90 *.mod-whirl temp.sed oad_cp.* postProcess.tag \$(PPEXTRAS:.F=.f)  AD_CLEAN += *_mod.h *_mod.F90 *.FF90 *.mod-whirl temp.sed oad_cp.* postProcess.tag
3414    
3415  # ============ end OpenAD specific section ==============  # ============ end OpenAD specific section ==============
3416    

Legend:
Removed from v.1.254  
changed lines
  Added in v.1.259

  ViewVC Help
Powered by ViewVC 1.1.22