/[MITgcm]/MITgcm/tools/genmake2
ViewVC logotype

Diff of /MITgcm/tools/genmake2

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.98 by edhill, Tue Sep 7 21:28:47 2004 UTC revision 1.99 by edhill, Mon Sep 27 15:49:48 2004 UTC
# Line 693  EOF Line 693  EOF
693      #echo "$FC $FFLAGS $FOPTIM -c genmake_tnc.f"      #echo "$FC $FFLAGS $FOPTIM -c genmake_tnc.f"
694      #echo "$LINK -o genmake_tnc.o $LIBS"      #echo "$LINK -o genmake_tnc.o $LIBS"
695      $CPP $DEFINES $INCLUDES genmake_tnc.for > genmake_tnc.f 2>/dev/null  \      $CPP $DEFINES $INCLUDES genmake_tnc.for > genmake_tnc.f 2>/dev/null  \
696          &&  $FC $FFLAGS $FOPTIM -c genmake_tnc.f  \          &&  $FC $FFLAGS $FOPTIM -c genmake_tnc.f >> genmake_tnc.log 2>&1  \
697          &&  $LINK -o genmake_tnc genmake_tnc.o $LIBS >> genmake_tnc.log 2>&1          &&  $LINK -o genmake_tnc genmake_tnc.o $LIBS >> genmake_tnc.log 2>&1
698      RET_COMPILE=$?      RET_COMPILE=$?
699      test -x ./genmake_tnc  &&  ./genmake_tnc >> genmake_tnc.log 2>&1  
700      RETVAL=$?      #EH3  Remove test program execution for machines that either disallow
701      if test "x$RET_COMPILE" = x0 -a "x$RETVAL" = x0 ; then      #EH3  execution or cannot support it (eg. cross-compilers)
702        #EH3
703        #EH3 test -x ./genmake_tnc  &&  ./genmake_tnc >> genmake_tnc.log 2>&1
704        #EH3 RETVAL=$?
705        #EH3 if test "x$RET_COMPILE" = x0 -a "x$RETVAL" = x0 ; then
706    
707        if test "x$RET_COMPILE" = x0 ; then
708          HAVE_NETCDF=t          HAVE_NETCDF=t
709      else      else
710          # try again with "-lnetcdf" added to the libs          # try again with "-lnetcdf" added to the libs
711          $CPP $DEFINES $INCLUDES genmake_tnc.for > genmake_tnc.f 2>/dev/null  \          $CPP $DEFINES $INCLUDES genmake_tnc.for > genmake_tnc.f 2>/dev/null  \
712              &&  $FC $FFLAGS $FOPTIM -o genmake_tnc genmake_tnc.f \              &&  $FC $FFLAGS $FOPTIM -c genmake_tnc.f >> genmake_tnc.log 2>&1  \
713              $LIBS -lnetcdf >> genmake_tnc_2.log 2>&1              &&  $LINK -o genmake_tnc genmake_tnc.o $LIBS -lnetcdf >> genmake_tnc.log 2>&1
714          RET_COMPILE=$?          RET_COMPILE=$?
715          test -x ./genmake_tnc  &&  ./genmake_tnc >> genmake_tnc.log 2>&1          if test "x$RET_COMPILE" = x0 ; then
         RETVAL=$?  
         if test "x$RET_COMPILE" = x0 -a "x$RETVAL" = x0 ; then  
716              LIBS="$LIBS -lnetcdf"              LIBS="$LIBS -lnetcdf"
717              HAVE_NETCDF=t              HAVE_NETCDF=t
718          else          else
# Line 1586  if test "x$RETVAL" = x0 ; then Line 1590  if test "x$RETVAL" = x0 ; then
1590      if test "x$HAVE_NETCDF" != xt ; then      if test "x$HAVE_NETCDF" != xt ; then
1591          cat <<EOF          cat <<EOF
1592    
1593  WARNING: the "mnc" package has been enabled but tests failed to  *********************************************************************
1594    compile and/or execute NetCDF applications.  Please check that:  WARNING: the "mnc" package was enabled but tests failed to compile
1595      NetCDF applications.  Please check that:
1596    
1597    1) NetCDF is installed for your compiler and    1) NetCDF is correctly installed for this compiler and
1598    2) the LIBS variable (within the 'optfile") specifies the correct    2) the LIBS variable (within the "optfile") specifies the correct
1599         NetCDF library to link against.         NetCDF library to link against.
1600      
1601      Due to this failure, the "mnc" package is now DISABLED.
1602    *********************************************************************
1603    
1604  EOF  EOF
1605            temp=`echo $PACKAGES | sed -e 's/mnc//g'`
1606            PACKAGES=$temp
1607      fi      fi
1608  fi  fi
1609    

Legend:
Removed from v.1.98  
changed lines
  Added in v.1.99

  ViewVC Help
Powered by ViewVC 1.1.22