--- MITgcm/tools/genmake2 2012/09/19 20:46:03 1.241 +++ MITgcm/tools/genmake2 2012/09/20 23:12:47 1.242 @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.241 2012/09/19 20:46:03 utke Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.242 2012/09/20 23:12:47 heimbach Exp $ # $Name: $ # # Makefile generator for MITgcm UV codes @@ -2482,6 +2482,11 @@ OAD_DONT_TRANSFORM="/dev/null" OAD_KEEP_ORIGINAL="/dev/null" OAD_CB2M_FILES="/dev/null" + OADTOOLS="$TOOLSDIR/OAD_support" + test -f "oadtempflile" && \rm -f "oadtempflile" +cat >> "oadtempflile" < ad_input_code_sf.pre.s2p.f90 + cat \$< | sed -f \${OADTOOLS}/stop2print.sed > ad_input_code_sf.pre.s2p.f90 # F -> WHIRL ad_input_code_sf.pre.s2p.B: ad_input_code_sf.pre.s2p.f90 @@ -3239,13 +3245,13 @@ \${OPEN64ROOT}/whirl2f/whirl2f -FLIST:ftn_file=\$@ -openad \$< # insert template directives -ad_input_code_sf.pre.s2p.xb.x2w.w2f.td.f$FS90: ad_input_code_sf.pre.s2p.xb.x2w.w2f.f$FS90 ../OAD_support/insertTemplateDir.bash - ../OAD_support/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 + \${OADTOOLS}/insertTemplateDir.bash \$< \$@ -PPEXTRAS=\$(wildcard ../OAD_support/ad_template.*.F) ../OAD_support/ad_inline.F +PPEXTRAS=\$(wildcard \${OADTOOLS}/ad_template.*.F) \${OADTOOLS}/ad_inline.F # postprocess F' postProcess.tag: ad_input_code_sf.pre.s2p.xb.x2w.w2f.td.f$FS90 \$(PPEXTRAS:.F=.f) | w2f__types.f90 - \${OPENADFORTTK_BASE}/tools/SourceProcessing/postProcess.py --progress --timing --infoUnitFile w2f__types.f90 --outputFormat=fixed --separateOutput --pathSuffix "" --filenameSuffix "_oad" -m r -i ../OAD_support/ad_inline.f \$< + \${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 \$< # the target is a placeholder to trigger a single execution of the rule touch \$@ # put this so make knows about the postprocessing output @@ -3257,9 +3263,9 @@ # link the support files: \$(OPENAD_SUPPORT_F90_SRC_FILES) \$(OPENAD_SUPPORT_C_SRC_FILES): - \$(LN) ../OAD_support/\$@ . + \$(LN) \${OADTOOLS}/\$@ . -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 oadtempflile \$(PPEXTRAS:.F=.f) # ============ end OpenAD specific section ==============