/[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.60 by edhill, Wed Jan 14 03:44:48 2004 UTC revision 1.65 by cnh, Mon Feb 16 16:24:41 2004 UTC
# Line 834  fi Line 834  fi
834  if test "x$LINK" = x ; then  if test "x$LINK" = x ; then
835      LINK=$FC      LINK=$FC
836  fi  fi
 if test "x$CPP" = x ; then  
     CPP="cpp"  
 fi  
837  if test "x$MAKE" = x ; then  if test "x$MAKE" = x ; then
838      MAKE="make"      MAKE="make"
839  fi  fi
840    if test "x$CPP" = x ; then
841        CPP=cpp
842    fi
843    #EH3 === UGLY ===
844    #  The following an ugly little hack to check for $CPP in /lib/ and it
845    #  should eventually be replaced with a more general function that
846    #  searches a combo of the user's path and a list of "usual suspects"
847    #  to find the correct location for binaries such as $CPP.
848    for i in " " "/lib/" ; do
849        echo "#define A a" | $i$CPP > test_cpp 2>&1 && CPP=$i$CPP
850    done
851    #EH3 === UGLY ===
852  echo "#define A a" | $CPP > test_cpp 2>&1  echo "#define A a" | $CPP > test_cpp 2>&1
853  RETVAL=$?  RETVAL=$?
854  if test "x$RETVAL" != x0 ; then  if test "x$RETVAL" != x0 ; then
# Line 973  if test "x${TOOLSDIR}" = x ; then Line 982  if test "x${TOOLSDIR}" = x ; then
982      TOOLSDIR="$ROOTDIR/tools"      TOOLSDIR="$ROOTDIR/tools"
983  fi  fi
984  if test ! -d ${TOOLSDIR} ; then  if test ! -d ${TOOLSDIR} ; then
985      echo "Error: the specified $TOOLSDIR (\"$TOOLSDIR\") does not exist!"      echo "Error: the specified TOOLSDIR (\"$TOOLSDIR\") does not exist!"
986      exit 1      exit 1
987  fi  fi
988  if test "x$S64" = x ; then  if test "x$S64" = x ; then
# Line 994  if test -r $ROOTDIR"/eesupp/src/Makefile Line 1003  if test -r $ROOTDIR"/eesupp/src/Makefile
1003          rm -f make_eesupp.errors          rm -f make_eesupp.errors
1004      else      else
1005          echo "Error: problem encountered while building source files in eesupp:"          echo "Error: problem encountered while building source files in eesupp:"
1006          cat make_eesupp.errors          cat make_eesupp.errors 1>&2
1007          exit 1          exit 1
1008      fi      fi
1009  fi  fi
# Line 1008  if test -r $ROOTDIR"/pkg/exch2/Makefile" Line 1017  if test -r $ROOTDIR"/pkg/exch2/Makefile"
1017          rm -f make_exch2.errors          rm -f make_exch2.errors
1018      else      else
1019          echo "Error: problem encountered while building source files in exch2:"          echo "Error: problem encountered while building source files in exch2:"
1020          cat make_exch2.errors          cat make_exch2.errors 1>&2
1021          exit 1          exit 1
1022      fi      fi
1023  fi  fi
# Line 1196  for i in $PACKAGES ; do Line 1205  for i in $PACKAGES ; do
1205      fi      fi
1206  done  done
1207    
1208  #  Check for ability to build and use NetCDF  #  Build MNC templates and check for ability to build and use NetCDF
1209  echo $PACKAGES | grep ' mnc ' > /dev/null 2>&1  echo $PACKAGES | grep ' mnc ' > /dev/null 2>&1
1210  RETVAL=$?  RETVAL=$?
1211  if test "x$RETVAL" = x0 -a "x$HAVE_NETCDF" != xt ; then  if test "x$RETVAL" = x0 ; then
1212      cat <<EOF      ( cd $ROOTDIR"/pkg/mnc" && $MAKE templates ) > make_mnc.errors 2>&1
1213        RETVAL=$?
1214        if test "x${RETVAL}" = x0 ; then
1215            rm -f make_mnc.errors
1216        else
1217            echo "Error: problem encountered while building source files in pkg/mnc:"
1218            cat make_mnc.errors 1>&2
1219            exit 1
1220        fi
1221        if test "x$HAVE_NETCDF" != xt ; then
1222            cat <<EOF
1223    
1224  WARNING: the "mnc" package has been enabled but tests failed to  WARNING: the "mnc" package has been enabled but tests failed to
1225    compile and/or execute NetCDF applications.  Please check that:    compile and/or execute NetCDF applications.  Please check that:
# Line 1210  WARNING: the "mnc" package has been enab Line 1229  WARNING: the "mnc" package has been enab
1229         NetCDF library to link against.         NetCDF library to link against.
1230        
1231  EOF  EOF
1232        fi
1233  fi  fi
1234    
1235  # Create a list of #define and #undef to enable/disable packages  # Create a list of #define and #undef to enable/disable packages
# Line 1743  $TOOLSDIR/convert_cpp_cmd2defines "Warni Line 1763  $TOOLSDIR/convert_cpp_cmd2defines "Warni
1763  if test ! -f $PACKAGES_DOT_H ; then  if test ! -f $PACKAGES_DOT_H ; then
1764      mv -f $PACKAGES_DOT_H".tmp" $PACKAGES_DOT_H      mv -f $PACKAGES_DOT_H".tmp" $PACKAGES_DOT_H
1765  else  else
1766      cmp $PACKAGES_DOT_H".tmp" $PACKAGES_DOT_H      cmp $PACKAGES_DOT_H".tmp" $PACKAGES_DOT_H > /dev/null 2>&1
1767      RETVAL=$?      RETVAL=$?
1768      if test "x$RETVAL" = x0 ; then      if test "x$RETVAL" = x0 ; then
1769          rm -f $PACKAGES_DOT_H".tmp"          rm -f $PACKAGES_DOT_H".tmp"

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.65

  ViewVC Help
Powered by ViewVC 1.1.22