--- MITgcm/tools/genmake2 2010/12/26 01:04:45 1.218 +++ MITgcm/tools/genmake2 2011/06/24 22:03:39 1.221 @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.218 2010/12/26 01:04:45 jmc Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.221 2011/06/24 22:03:39 jmc Exp $ # $Name: $ # # Makefile generator for MITgcm UV codes @@ -96,11 +96,6 @@ will search for a working compiler by trying a list of "usual suspects" such as gcc, c89, cc, etc. - -[no]ieee | --[no]ieee - Do or don't use IEEE numerics. Note that this option - *only* works if it is supported by the OPTFILE that - is being used. - -use_real4 | -use_r4 | -ur4 | --use_real4 | --use_r4 | --ur4 Use "real*4" type for _RS variable (#undef REAL4_IS_SLOW) *only* works if CPP_EEOPTIONS.h allows this. @@ -126,10 +121,14 @@ -hpmt | --hpmt Performance analysis with the HPM Toolkit - -gsl | --gsl - Use GSL to control floating point rounding and precision + -ieee | --ieee + use IEEE numerics. Note that this option *only* works + if it is supported by the OPTFILE that is being used. -devel | --devel Add additional warning and debugging flags for development + (if supported by the OPTFILE); also switch to IEEE numerics. + -gsl | --gsl + Use GSL to control floating point rounding and precision -mpi | --mpi Include MPI header files and link to MPI libraries @@ -359,6 +358,11 @@ MAKEDEPEND= fi else + echo "${MAKEDEPEND}" | grep 'tools.xmakedepend' > /dev/null 2>&1 + RETVAL=$? + if test "x$RETVAL" = x0 ; then + MAKEDEPEND='$(TOOLSDIR)/xmakedepend' + fi echo " --> MAKEDEPEND=${MAKEDEPEND}" >> $LOGFILE fi fi @@ -1147,7 +1151,7 @@ # The following state can be set directly by command-line switches gm_s1="OPTFILE PKG_DEPEND PKG_GROUPS MAKEFILE MAKEDEPEND PLATFORM ROOTDIR MODS DISABLE ENABLE" -gm_s2="FC CC IEEE USE_R4 TS PAPIS PCLS PAPI PCL HPMT GSL DEVEL MPI OMP DUMPSTATE STANDARDDIRS" +gm_s2="FC CC USE_R4 TS PAPIS PCLS PAPI PCL HPMT IEEE DEVEL GSL MPI OMP DUMPSTATE STANDARDDIRS" # The following state is not directly set by command-line switches gm_s3="LN S64 LINK MAKE PACKAGES INCLUDES FFLAGS FOPTIM FEXTRAFLAGS" @@ -1311,13 +1315,17 @@ -fs90=* | --fs90=*) FS90=$ac_optarg ;; + -use_real4 | -use_r4 | -ur4 | --use_real4 | --use_r4 | --ur4 ) + USE_R4=true ;; + -ieee | --ieee) IEEE=true ;; -noieee | --noieee) - IEEE= ;; - - -use_real4 | -use_r4 | -ur4 | --use_real4 | --use_r4 | --ur4 ) - USE_R4=true ;; + echo "Warning: ignore option '$ac_option' (default is already without '-ieee')" ;; + -devel | --devel) + IEEE=true ; DEVEL=true ;; + -gsl | --gsl) + GSL=true ;; -ts | --ts) TS=true ;; @@ -1334,12 +1342,6 @@ -hpmt | --hpmt) HPMT=true ;; - -gsl | --gsl) - GSL=true ;; - - -devel | --devel) - DEVEL=true ;; - -mpi | --mpi) MPI=true ;; -mpi=* | --mpi=*) @@ -1390,7 +1392,7 @@ echo "WARNING: genmake2 has detected a copy of the old-style \"./.genmakerc\"" echo " file. This file format is no longer supported. For directions on" echo " how to setup and use the new \"genmake2\" script, please see:" - echo " http://mitgcm.org/devel_HOWTO/" + echo " http://mitgcm.org/public/devel_HOWTO/" echo " and send an email to MITgcm-support@mitgcm.org if you need help." echo "WARNING: ignore \"./.genmakerc\" and continue." echo @@ -2719,7 +2721,8 @@ CLEAN: @make Clean -rm -f \$(EXECUTABLE) \$(EXE_AD) *.bak - -rm -f $LOGFILE genmake_state genmake_*optfile genmake.tr_log make.tr_log + -rm -f $LOGFILE genmake_state genmake_*optfile + -rm -f SIZE.h.mpi genmake.tr_log make.tr_log -find \$(EXEDIR) -name "*.meta" -exec rm {} \; -find \$(EXEDIR) -name "*.data" -exec rm {} \; -find \$(EXEDIR) -name "fort.*" -exec rm {} \;