--- MITgcm/tools/genmake2 2004/05/04 16:30:21 1.78 +++ MITgcm/tools/genmake2 2004/06/30 00:58:06 1.81 @@ -1,6 +1,6 @@ -#! /usr/bin/env bash +#! /usr/bin/env sh # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.78 2004/05/04 16:30:21 adcroft Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.81 2004/06/30 00:58:06 cnh Exp $ # # Makefile generator for MITgcm UV codes # created by cnh 03/98 @@ -371,6 +371,11 @@ -help | --help | -h | --h Print this help message and exit. + -adoptfile NAME | --adoptfile NAME | -adof NAME | --adof NAME + -adoptfile=NAME | --adoptfile=NAME | -adof=NAME | --adof=NAME + Use "NAME" as the adoptfile. By default, the file at + "tools/adjoint_options/adjoint_default" will be used. + -nooptfile | --nooptfile -optfile NAME | --optfile NAME | -of NAME | --of NAME -optfile=NAME | --optfile=NAME | -of=NAME | --of=NAME @@ -677,6 +682,7 @@ FC_NAMEMANGLE= HAVE_CLOC= HAVE_NETCDF= +HAVE_ETIME= MODS= TOOLSDIR= @@ -727,7 +733,7 @@ gm_s4="CFLAGS KFLAGS1 KFLAGS2 LIBS KPPFILES NOOPTFILES NOOPTFLAGS" gm_s5="TOOLSDIR SOURCEDIRS INCLUDEDIRS PWD MAKE THISHOSTNAME THISDATE MACHINE" gm_s6="EXECUTABLE EXEHOOK EXEDIR PACKAGES_CONF" -gm_s7="HAVE_SYSTEM HAVE_FDATE FC_NAMEMANGLE" +gm_s7="HAVE_SYSTEM HAVE_FDATE FC_NAMEMANGLE HAVE_ETIME" # The following are all related to adjoint/tangent-linear stuff gm_s10="AUTODIFF_PKG_USED AD_OPTFILE TAMC TAF AD_TAMC_FLAGS AD_TAF_FLAGS" @@ -1146,6 +1152,26 @@ echo "no" fi rm -f genmake_tcomp* + +printf " Do we have the etime() command using $FC... " +cat > genmake_tcomp.f < genmake_tcomp.log 2>&1 +RETVAL=$? +if test "x$RETVAL" = x0 ; then + HAVE_ETIME=t + DEFINES="$DEFINES -DHAVE_ETIME" + echo "yes" +else + HAVE_ETIME= + echo "no" +fi +rm -f genmake_tcomp* printf " Can we call simple C routines (here, \"cloc()\") using $FC... " check_HAVE_CLOC