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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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: |