--- MITgcm/tools/genmake2 2004/12/10 13:07:47 1.112 +++ MITgcm/tools/genmake2 2005/01/05 22:30:55 1.114 @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.112 2004/12/10 13:07:47 edhill Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.114 2005/01/05 22:30:55 edhill Exp $ # # Makefile generator for MITgcm UV codes # created by cnh 03/98 @@ -718,10 +718,18 @@ check_netcdf_libs() { + if test ! "x$SKIP_NETCDF_CHECK" = x ; then + return + fi echo "" > genmake_tnc.log cat < genmake_tnc.for program fgennc #include "netcdf.inc" +EOF + if test ! "x$MPI" = x ; then + echo '#include "mpif.h"' >> genmake_tnc.for + fi + cat <> genmake_tnc.for integer iret, ncid, xid iret = nf_create('genmake_tnc.nc', NF_CLOBBER, ncid) IF (iret .NE. NF_NOERR) write(*,*) NF_STRERROR(iret) @@ -788,9 +796,9 @@ LN= S64= KPP= -FC= +#FC= #CC=gcc -CPP= +#CPP= LINK= DEFINES= PACKAGES= @@ -834,8 +842,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` @@ -1848,7 +1856,7 @@ deplist="$deplist $sf" ;; esac - extn=`echo $sf | $AWK -F '.' '{print $NF}'` + extn=`echo $sf | $AWK 'BEGIN {FS="."}; {print $NF}'` case $extn in F) echo " \\" >> srclist.inc