--- MITgcm/tools/genmake2 2004/10/22 11:46:02 1.109 +++ MITgcm/tools/genmake2 2005/09/05 14:56:47 1.129 @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.109 2004/10/22 11:46:02 heimbach Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.129 2005/09/05 14:56:47 edhill Exp $ # # Makefile generator for MITgcm UV codes # created by cnh 03/98 @@ -122,8 +122,8 @@ stop end EOF - test -f Makefile && mv -f Makefile Makefile.bak - cat <> Makefile + test -f $MAKEFILE && mv -f $MAKEFILE $MAKEFILE".tst" + cat <> $MAKEFILE .SUFFIXES: .SUFFIXES: .$tfs .F .F.$tfs: @@ -148,8 +148,8 @@ return fi fi - rm -f genmake_hello.* Makefile - test -f Makefile && mv -f Makefile.bak Makefile + rm -f genmake_hello.* $MAKEFILE + test -f $MAKEFILE".tst" && mv -f $MAKEFILE".tst" $MAKEFILE # If we make it here, use the extensions FS=$tfs @@ -181,6 +181,15 @@ if test "x${MAKEDEPEND}" = x ; then which makedepend > /dev/null 2>&1 RV0=$? + test -f $MAKEFILE && mv -f $MAKEFILE $MAKEFILE".tst" + # echo 'MAKEFILE="'$MAKEFILE'"' + cat <> $MAKEFILE +# THIS IS A TEST MAKEFILE GENERATED BY "genmake2" +# +# Some "makedepend" implementations will die if they cannot +# find a Makefile -- so this file is here to gives them an +# empty one to find and parse. +EOF cat <> genmake_tc.f program test write(*,*) 'test' @@ -189,6 +198,8 @@ EOF makedepend genmake_tc.f > /dev/null 2>&1 RV1=$? + test -f $MAKEFILE && rm -f $MAKEFILE + test -f $MAKEFILE".tst" && mv -f $MAKEFILE".tst" $MAKEFILE if test "x${RV0}${RV1}" = x00 ; then MAKEDEPEND=makedepend else @@ -310,7 +321,7 @@ #================================================================ # look for possible FORTRAN compilers - tmp="$MITGCM_FC $FC efc g77 f77 pgf77 pgf95 ifc f90 f95 mpif77 mpf77 mpxlf95" + tmp="$MITGCM_FC $FC efc g77 f77 pgf77 pgf95 ifc f90 f95 mpif77 mpf77 mpxlf95 gfortran" p_FC= for c in $tmp ; do rm -f ./hello.f ./hello @@ -516,6 +527,9 @@ *only* works if it is supported by the OPTFILE that is being used. + -ts | --ts + Produce timing information per timestep + -mpi | --mpi Include MPI header files and link to MPI libraries -mpi=PATH | --mpi=PATH @@ -581,13 +595,13 @@ EOF return 1 fi - cat > genmake_tcomp.f < genmake_tcomp.$FS <> genmake_warnings 2>&1 + $FC $FFLAGS $DEFINES -c genmake_tcomp.$FS >> genmake_warnings 2>&1 RETVAL=$? if test "x$RETVAL" != x0 ; then FC_NAMEMANGLE=$default_nm @@ -653,19 +667,19 @@ *curtim = *curtim/1.E6; } EOF - make genmake_tc_1.o >> genmake_tc.log 2>&1 + make genmake_tc_1.o >> genmake_warnings 2>&1 RET_C=$? - cat < genmake_tc_2.f + cat < genmake_tc_2.$FS program hello - Real*8 wtime + REAL*8 wtime external cloc call cloc(wtime) print *," HELLO WORLD", wtime - end program hello + end EOF - $FC $FFLAGS -o genmake_tc genmake_tc_2.f genmake_tc_1.o >> genmake_tc.log 2>&1 + $FC $FFLAGS -o genmake_tc genmake_tc_2.$FS genmake_tc_1.o >> genmake_warnings 2>&1 RET_F=$? - test -x ./genmake_tc && ./genmake_tc >> genmake_tc.log 2>&1 + test -x ./genmake_tc && ./genmake_tc >> genmake_warnings 2>&1 RETVAL=$? if test "x$RETVAL" = x0 ; then HAVE_CLOC=t @@ -698,14 +712,14 @@ EOF make genmake_tc_1.o >> genmake_tc.log 2>&1 RET_C=$? - cat < genmake_tc_2.f + cat < genmake_tc_2.$FS program hello integer nbyte call tfsize(nbyte) print *," HELLO WORLD", nbyte - end program hello + end EOF - $FC $FFLAGS -o genmake_tc genmake_tc_2.f genmake_tc_1.o >> genmake_tc.log 2>&1 + $FC $FFLAGS -o genmake_tc genmake_tc_2.$FS genmake_tc_1.o >> genmake_tc.log 2>&1 RET_F=$? test -x ./genmake_tc && ./genmake_tc >> genmake_tc.log 2>&1 RETVAL=$? @@ -718,10 +732,18 @@ check_netcdf_libs() { + if test ! "x$SKIP_NETCDF_CHECK" = x ; then + return + fi echo "" > genmake_tnc.log - cat < genmake_tnc.for + cat < genmake_tnc.F program fgennc #include "netcdf.inc" +EOF + if test ! "x$MPI" = x ; then + echo '#include "mpif.h"' >> genmake_tnc.F + fi + cat <> genmake_tnc.F integer iret, ncid, xid iret = nf_create('genmake_tnc.nc', NF_CLOBBER, ncid) IF (iret .NE. NF_NOERR) write(*,*) NF_STRERROR(iret) @@ -731,11 +753,22 @@ IF (iret .NE. NF_NOERR) write(*,*) NF_STRERROR(iret) end EOF - #echo "$CPP $DEFINES $INCLUDES genmake_tnc.for > genmake_tnc.f" - #echo "$FC $FFLAGS $FOPTIM -c genmake_tnc.f" - #echo "$LINK -o genmake_tnc.o $LIBS" - $CPP $DEFINES $INCLUDES genmake_tnc.for > genmake_tnc.f 2>/dev/null \ - && $FC $FFLAGS $FOPTIM -c genmake_tnc.f >> genmake_tnc.log 2>&1 \ + echo "Executing:" > genmake_tnc.log + echo " $CPP $DEFINES $INCLUDES genmake_tnc.F > genmake_tnc.$FS" \ + > genmake_tnc.log + RET_CPP=f + $CPP $DEFINES $INCLUDES genmake_tnc.F > genmake_tnc.$FS 2>/dev/null \ + && RET_CPP=t + if test "x$RET_CPP" = xf ; then + echo " WARNING: CPP failed to pre-process the netcdf test." \ + > genmake_tnc.log + echo " Please check that \$INCLUDES is properly set." \ + > genmake_tnc.log + fi + echo "Executing:" > genmake_tnc.log + echo " $FC $FFLAGS $FOPTIM -c genmake_tnc.$FS" > genmake_tnc.log + echo " $LINK -o genmake_tnc.o $LIBS" > genmake_tnc.log + $FC $FFLAGS $FOPTIM -c genmake_tnc.$FS >> genmake_tnc.log 2>&1 \ && $LINK -o genmake_tnc genmake_tnc.o $LIBS >> genmake_tnc.log 2>&1 RET_COMPILE=$? @@ -750,8 +783,8 @@ HAVE_NETCDF=t else # try again with "-lnetcdf" added to the libs - $CPP $DEFINES $INCLUDES genmake_tnc.for > genmake_tnc.f 2>/dev/null \ - && $FC $FFLAGS $FOPTIM -c genmake_tnc.f >> genmake_tnc.log 2>&1 \ + $CPP $DEFINES $INCLUDES genmake_tnc.F > genmake_tnc.$FS 2>/dev/null \ + && $FC $FFLAGS $FOPTIM -c genmake_tnc.$FS >> genmake_tnc.log 2>&1 \ && $LINK -o genmake_tnc genmake_tnc.o $LIBS -lnetcdf >> genmake_tnc.log 2>&1 RET_COMPILE=$? if test "x$RET_COMPILE" = x0 ; then @@ -777,21 +810,21 @@ LN= S64= KPP= -FC= +#FC= #CC=gcc -CPP= +#CPP= LINK= DEFINES= PACKAGES= ENABLE= DISABLE= -MAKEFILE= -#MAKEDEPEND= +# MAKEFILE= +# MAKEDEPEND= PDEPEND= DUMPSTATE=t PDEFAULT= OPTFILE= -INCLUDES="-I." +INCLUDES="-I. $INCLUDES" FFLAGS= FOPTIM= CFLAGS= @@ -804,8 +837,9 @@ NOOPTFLAGS= MPI= MPIPATH= +TS= -# DEFINES checked by test compilation +# DEFINES checked by test compilation or command-line HAVE_SYSTEM= HAVE_FDATE= FC_NAMEMANGLE= @@ -813,6 +847,7 @@ HAVE_STAT= HAVE_NETCDF= HAVE_ETIME= +IGNORE_TIME= MODS= TOOLSDIR= @@ -823,8 +858,8 @@ G2ARGS= BASH= PWD=`pwd` -MAKE=make -AWK=awk +test "x$MAKE" = x && MAKE=make +test "x$AWK" = x && AWK=awk THISHOST=`hostname` THISCWD=`pwd` THISDATE=`date` @@ -858,7 +893,7 @@ # The following state can be set directly by command-line switches gm_s1="OPTFILE PDEPEND PDEFAULT MAKEFILE PLATFORM ROOTDIR MODS DISABLE ENABLE" -gm_s2="FC CPP IEEE MPI JAM DUMPSTATE STANDARDDIRS" +gm_s2="FC CPP IEEE TS MPI JAM DUMPSTATE STANDARDDIRS" # The following state is not directly set by command-line switches gm_s3="LN S64 KPP LINK PACKAGES MAKEDEPEND PDEPEND PDEFAULT INCLUDES FFLAGS FOPTIM " @@ -1038,6 +1073,9 @@ -noieee | --noieee) IEEE= ;; + -ts | --ts) + TS=true ;; + -mpi | --mpi) MPI=true ;; -mpi=* | --mpi=*) @@ -1061,6 +1099,9 @@ ac_prev=TAMC_EXTRA ;; -tamc_extra=* | --tamc_extra=*) TAMC_EXTRA=$ac_optarg ;; + + -ignoretime | -ignore_time | --ignoretime | --ignore_time) + IGNORE_TIME="-DIGNORE_TIME" ;; -*) echo "Error: unrecognized option: "$ac_option @@ -1076,6 +1117,7 @@ done + if test -f ./.genmakerc ; then echo echo "WARNING: genmake2 has detected a copy of the old-style \"./.genmakerc\"" @@ -1090,7 +1132,7 @@ # Find the MITgcm ${ROOTDIR} if test "x${ROOTDIR}" = x ; then - tmp=`echo $PWD | sed -e 's/\// /g' | awk '{print $NR}'` + tmp=`echo $PWD | sed -e 's/\// /g' | $AWK '{print $NR}'` if test "x$tmp" = "xbin" -a -d ../model -a -d ../eesup -a -d ../pkg ; then ROOTDIR=".." else @@ -1117,7 +1159,11 @@ # Find the MITgcm ${THISVER} if test -f "${ROOTDIR}/doc/tag-index" ; then - THISVER=`grep checkpoint ${ROOTDIR}/doc/tag-index | head -1` + THISVER=`grep '^checkpoint' ${ROOTDIR}/doc/tag-index | head -1` +fi + +if test "x$MAKEFILE" = x ; then + MAKEFILE="Makefile" fi echo " getting OPTFILE information: " @@ -1149,9 +1195,6 @@ fi fi -# Check for broken systems that cannot correctly distinguish *.F and *.f files -# check_for_broken_Ff - echo " getting AD_OPTFILE information: " if test "x${AD_OPTFILE}" = x ; then if test "x$MITGCM_AD_OF" = x ; then @@ -1179,6 +1222,9 @@ fi fi +#==================================================================== +# Set default values if not set by the optfile +# # Check that FC, CC, LINK, CPP, S64, LN, and MAKE are defined. If not, # either set defaults or complain and abort! if test ! "x$BASH" = x ; then @@ -1265,14 +1311,19 @@ DEFINES="$DEFINES -DALLOW_USE_MPI -DALWAYS_USE_MPI" fi +if test ! "x$TS" = x ; then + echo " Turning on timing per timestep" + DEFINES="$DEFINES -DTIME_PER_TIMESTEP" +fi + printf "\n=== Checking system libraries ===\n" printf " Do we have the system() command using $FC... " -cat > genmake_tcomp.f < genmake_tcomp.$FS < genmake_tcomp.log 2>&1 +$FC $FFLAGS $DEFINES -o genmake_tcomp genmake_tcomp.$FS > genmake_tcomp.log 2>&1 RETVAL=$? if test "x$RETVAL" = x0 ; then HAVE_SYSTEM=t @@ -1285,15 +1336,15 @@ rm -f genmake_tcomp* printf " Do we have the fdate() command using $FC... " -cat > genmake_tcomp.f < genmake_tcomp.$FS < genmake_tcomp.log 2>&1 +$FC $FFLAGS $DEFINES -o genmake_tcomp genmake_tcomp.$FS > genmake_tcomp.log 2>&1 RETVAL=$? if test "x$RETVAL" = x0 ; then HAVE_FDATE=t @@ -1306,7 +1357,7 @@ rm -f genmake_tcomp* printf " Do we have the etime() command using $FC... " -cat > genmake_tcomp.f < genmake_tcomp.$FS < genmake_tcomp.log 2>&1 +$FC $FFLAGS $DEFINES -o genmake_tcomp genmake_tcomp.$FS > genmake_tcomp.log 2>&1 RETVAL=$? if test "x$RETVAL" = x0 ; then HAVE_ETIME=t @@ -1352,7 +1403,7 @@ else echo "no" fi - +DEFINES="$DEFINES $IGNORE_TIME" printf "\n=== Setting defaults ===\n" printf " Adding MODS directories: " @@ -1369,15 +1420,12 @@ done echo -if test "x$MAKEFILE" = x ; then - MAKEFILE="Makefile" -fi if test "x${PLATFORM}" = x ; then PLATFORM=$p_PLATFORM fi if test "x${EXEDIR}" = x ; then - tmp=`echo $PWD | sed -e 's/\// /g' | awk '{print $NR}'` + tmp=`echo $PWD | sed -e 's/\// /g' | $AWK '{print $NR}'` if test "x$tmp" = "xbin" -a -d ../exe -a $ROOTDIR = .. ; then EXEDIR=../exe else @@ -1588,7 +1636,7 @@ PACKAGES=`echo $PACKAGES | sed -e 's/mnc//g'` DISABLE="$DISABLE mnc" else - ( cd $ROOTDIR"/pkg/mnc" && $MAKE templates ) > make_mnc.errors 2>&1 + ( cd $ROOTDIR"/pkg/mnc" && $MAKE testclean && $MAKE templates ) > make_mnc.errors 2>&1 RETVAL=$? if test "x${RETVAL}" = x0 ; then rm -f make_mnc.errors @@ -1703,14 +1751,14 @@ fi done if test "x$has_pack" = xf ; then - undef=`echo "ALLOW_$n" | $AWK '{print toupper($0)}'` + undef=`echo "ALLOW_$n" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` DISABLED_PACKAGES="$DISABLED_PACKAGES -U$undef" fi fi done ENABLED_PACKAGES= for i in $PACKAGES ; do - def=`echo "ALLOW_$i" | $AWK '{print toupper($0)}'` + def=`echo "ALLOW_$i" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` ENABLED_PACKAGES="$ENABLED_PACKAGES -D$def" #eh3 DEFINES="$DEFINES -D$def" @@ -1794,7 +1842,10 @@ cat $i/$j >> ad_files done done - +if test ! "x"$FS = "x.f" ; then + cat ad_files | sed -e "s/\.f/.$FS/g" > ad_files_f + mv -f ad_files_f ad_files +fi echo echo "=== Creating the Makefile ===" @@ -1837,7 +1888,7 @@ deplist="$deplist $sf" ;; esac - extn=`echo $sf | $AWK -F '.' '{print $NF}'` + extn=`echo $sf | $AWK -F. '{print $NF}'` case $extn in F) echo " \\" >> srclist.inc @@ -1990,7 +2041,7 @@ cat ad_flow_files.inc >> $MAKEFILE echo >> $MAKEFILE echo 'F77FILES = $(SRCFILES:.F=.'$FS')' >> $MAKEFILE -echo 'F90FILES = $(F90SRCFILES:.F=.'$FS90')' >> $MAKEFILE +echo 'F90FILES = $(F90SRCFILES:.F90=.'$FS90')' >> $MAKEFILE echo 'OBJFILES = $(SRCFILES:.F=.o) $(CSRCFILES:.c=.o) $(F90SRCFILES:.F90=.o)' >> $MAKEFILE echo >> $MAKEFILE echo '.SUFFIXES:' >> $MAKEFILE @@ -2119,31 +2170,31 @@ # ... AD ... adall: ad_taf -adtaf: ad_taf_output.f -adtamc: ad_tamc_output.f +adtaf: ad_taf_output.$FS +adtamc: ad_tamc_output.$FS -ad_input_code.f: \$(AD_FILES) \$(HEADERFILES) +ad_input_code.$FS: \$(AD_FILES) \$(HEADERFILES) @$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 cmp ad_config.template AD_CONFIG.h || cat ad_config.template > AD_CONFIG.h -rm -f ad_config.template @make \$(F77FILES) @make \$(AD_FLOW_FILES) - cat \$(AD_FLOW_FILES) \$(AD_FILES) > ad_input_code.f + cat \$(AD_FLOW_FILES) \$(AD_FILES) > ad_input_code.$FS -ad_taf_output.f: ad_input_code.f - \$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.f - cat ad_input_code_ad.f | sed -f \$(TOOLSDIR)/adjoint_sed > ad_taf_output.f +ad_taf_output.$FS: ad_input_code.$FS + \$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.$FS + cat ad_input_code_ad.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ad_taf_output.$FS adtafonly: - \$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.f - cat ad_input_code_ad.f | sed -f \$(TOOLSDIR)/adjoint_sed > ad_taf_output.f + \$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.$FS + cat ad_input_code_ad.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ad_taf_output.$FS ad_taf: ad_taf_output.o \$(OBJFILES) \$(LINK) -o ${EXE_AD} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ad_taf_output.o \$(LIBS) -ad_tamc_output.f: ad_input_code.f - \$(TAMC) \$(AD_TAMC_FLAGS) \$(TAMC_EXTRA) ad_input_code.f - cat ad_input_code_ad.f | sed -f \$(TOOLSDIR)/adjoint_sed > ad_tamc_output.f +ad_tamc_output.$FS: ad_input_code.$FS + \$(TAMC) \$(AD_TAMC_FLAGS) \$(TAMC_EXTRA) ad_input_code.$FS + cat ad_input_code_ad.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ad_tamc_output.$FS ad_tamc: ad_tamc_output.o \$(OBJFILES) \$(LINK) -o ${EXE_AD} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ad_tamc_output.o \$(LIBS) @@ -2156,38 +2207,38 @@ # ... FTL ... ftlall: ftl_taf -ftltaf: ftl_taf_output.f -ftltamc: ftl_tamc_output.f +ftltaf: ftl_taf_output.$FS +ftltamc: ftl_tamc_output.$FS -ftl_input_code.f: \$(AD_FILES) \$(HEADERFILES) +ftl_input_code.$FS: \$(AD_FILES) \$(HEADERFILES) @$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 cmp ftl_config.template AD_CONFIG.h || cat ftl_config.template > AD_CONFIG.h -rm -f ftl_config.template @make \$(F77FILES) @make \$(AD_FLOW_FILES) - cat \$(AD_FLOW_FILES) \$(AD_FILES) > ftl_input_code.f + cat \$(AD_FLOW_FILES) \$(AD_FILES) > ftl_input_code.$FS -ftl_taf_output.f: ftl_input_code.f - \$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.f - cat ftl_input_code_ftl.f | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.f +ftl_taf_output.$FS: ftl_input_code.$FS + \$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.$FS + cat ftl_input_code_ftl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.$FS ftltafonly: - \$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.f - cat ftl_input_code_ftl.f | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.f + \$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.$FS + cat ftl_input_code_ftl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.$FS ftl_taf: ftl_taf_output.o \$(OBJFILES) \$(LINK) -o ${EXE_FTL} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ftl_taf_output.o \$(LIBS) -ftl_tamc_output.f: ftl_input_code.f - \$(TAMC) \$(FTL_TAMC_FLAGS) \$(TAMC_EXTRA) ftl_input_code.f - cat ftl_input_code_ftl.f | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_tamc_output.f +ftl_tamc_output.$FS: ftl_input_code.$FS + \$(TAMC) \$(FTL_TAMC_FLAGS) \$(TAMC_EXTRA) ftl_input_code.$FS + cat ftl_input_code_ftl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_tamc_output.$FS ftl_tamc: ftl_tamc_output.o \$(OBJFILES) \$(LINK) -o ${EXE_FTL} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ftl_tamc_output.o \$(LIBS) # ... SVD ... -svdtaf: ad_taf_output.f ftl_taf_output.f +svdtaf: ad_taf_output.$FS ftl_taf_output.$FS @echo "--->>> Only ran TAF to generate SVD code! <<<---" @echo "--->>> Do make svdall afterwards to compile. <<<---" svdall: svd_touch svd_taf @@ -2203,9 +2254,9 @@ @echo "--->>> Only COMPILE svd code! <<<---" @echo "--->>> Assumes you previously <<<---" @echo "--->>> did make svdtaf <<<---" - touch ad_taf_output.f ftl_taf_output.f - \$(FC) \$(FFLAGS) \$(FOPTIM) -c ad_taf_output.f - \$(FC) \$(FFLAGS) \$(FOPTIM) -c ftl_taf_output.f + touch ad_taf_output.$FS ftl_taf_output.$FS + \$(FC) \$(FFLAGS) \$(FOPTIM) -c ad_taf_output.$FS + \$(FC) \$(FFLAGS) \$(FOPTIM) -c ftl_taf_output.$FS @$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 cmp ftl_config.template AD_CONFIG.h || cat ftl_config.template > AD_CONFIG.h -rm -f ftl_config.template