/[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.52 by adcroft, Thu Dec 4 15:00:01 2003 UTC revision 1.57 by edhill, Tue Dec 9 18:58:24 2003 UTC
# Line 78  find_possible_configs()  { Line 78  find_possible_configs()  {
78      tmp1=`uname`"_"`uname -m`      tmp1=`uname`"_"`uname -m`
79      tmp2=`echo $tmp1 | sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`      tmp2=`echo $tmp1 | sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
80      tmp3=`echo $tmp2 | sed -e 's/power macintosh/ppc/'`      tmp3=`echo $tmp2 | sed -e 's/power macintosh/ppc/'`
81      PLATFORM=`echo $tmp3 | sed -e 's/i[3-6]86/ia32/' | sed -e 's/athlon/ia32/'`      tmp1=`echo $tmp3 | sed -e 's|x86_64|amd64|'`
82        tmp2=`echo $tmp1 | sed -e 's/i[3-6]86/ia32/' | sed -e 's/athlon/ia32/'`
83        PLATFORM=$tmp2
84      OFLIST=`(cd $ROOTDIR/tools/build_options; ls | grep "^$PLATFORM")`      OFLIST=`(cd $ROOTDIR/tools/build_options; ls | grep "^$PLATFORM")`
85      echo "  The platform appears to be:  $PLATFORM"      echo "  The platform appears to be:  $PLATFORM"
86            
# Line 476  MODS= Line 478  MODS=
478  TOOLSDIR=  TOOLSDIR=
479  SOURCEDIRS=  SOURCEDIRS=
480  INCLUDEDIRS=  INCLUDEDIRS=
481  STANDARDDIRS=  STANDARDDIRS="USE_THE_DEFAULT"
482    
483  PWD=`pwd`  PWD=`pwd`
484  MAKE=make  MAKE=make
# Line 1177  for i in $PACKAGES ; do Line 1179  for i in $PACKAGES ; do
1179  #EH3  WARNING :  This is an UGLY HACK that needs to be removed!!!  #EH3  WARNING :  This is an UGLY HACK that needs to be removed!!!
1180      case $i in      case $i in
1181          aim_v23)          aim_v23)
             DEFINES="$DEFINES -DALLOW_AIM"  
1182              ENABLED_PACKAGES="$ENABLED_PACKAGES -DALLOW_AIM"              ENABLED_PACKAGES="$ENABLED_PACKAGES -DALLOW_AIM"
1183              echo "Warning: ALLOW_AIM is set to enable aim_v23. This is REALLY ugly Jean-Michel :-)"              echo "Warning: ALLOW_AIM is set to enable aim_v23."
1184              ;;              ;;
1185      esac      esac
1186  #EH3  WARNING :  This is an UGLY HACK that needs to be removed!!!  #EH3  WARNING :  This is an UGLY HACK that needs to be removed!!!
# Line 1188  done Line 1189  done
1189    
1190  echo "  Adding STANDARDDIRS"  echo "  Adding STANDARDDIRS"
1191  BUILDDIR=${BUILDDIR:-.}  BUILDDIR=${BUILDDIR:-.}
1192  if test "x$STANDARDDIRS" = x ; then  if test "x$STANDARDDIRS" = xUSE_THE_DEFAULT ; then
1193      STANDARDDIRS="eesupp model"      STANDARDDIRS="eesupp model"
1194  fi  fi
1195  for d in $STANDARDDIRS ; do  if test "x$STANDARDDIRS" != x ; then
1196      adr="$ROOTDIR/$d/src"      for d in $STANDARDDIRS ; do
1197      if test ! -d $adr ; then          adr="$ROOTDIR/$d/src"
1198          echo "Error:  directory $adr not found -- please check that ROOTDIR=\"$ROOTDIR\""          if test ! -d $adr ; then
1199          echo "  is correct and that you correctly specified the STANDARDDIRS option"              echo "Error:  directory $adr not found -- please check that ROOTDIR=\"$ROOTDIR\""
1200          exit 1              echo "  is correct and that you correctly specified the STANDARDDIRS option"
1201      else              exit 1
1202          SOURCEDIRS="$SOURCEDIRS $adr"          else
1203      fi              SOURCEDIRS="$SOURCEDIRS $adr"
1204      adr="$ROOTDIR/$d/inc"          fi
1205      if test ! -d $adr ; then          adr="$ROOTDIR/$d/inc"
1206          echo "Error:  directory $adr not found -- please check that ROOTDIR=\"$ROOTDIR\""          if test ! -d $adr ; then
1207          echo "  is correct and that you correctly specified the STANDARDDIRS option"              echo "Error:  directory $adr not found -- please check that ROOTDIR=\"$ROOTDIR\""
1208          exit 1              echo "  is correct and that you correctly specified the STANDARDDIRS option"
1209      else              exit 1
1210          INCLUDEDIRS="$INCLUDEDIRS $adr"          else
1211      fi              INCLUDEDIRS="$INCLUDEDIRS $adr"
1212  done          fi
1213        done
1214    fi
1215    
1216  echo "  Searching for *OPTIONS.h files in order to warn about the presence"  echo "  Searching for *OPTIONS.h files in order to warn about the presence"
1217  echo "    of \"#define \"-type statements that are no longer allowed:"  echo "    of \"#define \"-type statements that are no longer allowed:"
# Line 1218  spaths=". $INCLUDEDIRS" Line 1221  spaths=". $INCLUDEDIRS"
1221  names=`ls -1 "$ROOTDIR/pkg"`  names=`ls -1 "$ROOTDIR/pkg"`
1222  for i in $spaths ; do  for i in $spaths ; do
1223      try="$i/CPP_OPTIONS.h"      try="$i/CPP_OPTIONS.h"
1224      if test -f $try -a -r $try -a "x$CPP_OPTIONS" == x ; then      if test -f $try -a -r $try -a "x$CPP_OPTIONS" = x ; then
1225          echo "    found CPP_OPTIONS=\"$try\""          echo "    found CPP_OPTIONS=\"$try\""
1226          CPP_OPTIONS="$try"          CPP_OPTIONS="$try"
1227          # New safety test: make sure packages are not mentioned in CPP_OPTIONS.h          # New safety test: make sure packages are not mentioned in CPP_OPTIONS.h
# Line 1227  for i in $spaths ; do Line 1230  for i in $spaths ; do
1230          done          done
1231      fi      fi
1232      try="$i/CPP_EEOPTIONS.h"      try="$i/CPP_EEOPTIONS.h"
1233      if test -f $try -a -r $try -a "x$CPP_EEOPTIONS" == x ; then      if test -f $try -a -r $try -a "x$CPP_EEOPTIONS" = x ; then
1234          echo "    found CPP_EEOPTIONS=\"$try\""          echo "    found CPP_EEOPTIONS=\"$try\""
1235          # New safety test: make sure MPI is not determined by CPP_EEOPTIONS.h          # New safety test: make sure MPI is not determined by CPP_EEOPTIONS.h
1236  #**** not yet enabled ****  #**** not yet enabled ****
# Line 1353  EXE_FTL=$EXECUTABLE"_ftl" Line 1356  EXE_FTL=$EXECUTABLE"_ftl"
1356  EXE_SVD=$EXECUTABLE"_svd"  EXE_SVD=$EXECUTABLE"_svd"
1357    
1358  cat >>$MAKEFILE <<EOF  cat >>$MAKEFILE <<EOF
1359    #
1360    # OPTFILE="$OPTFILE"
1361  #  #
1362  # BUILDDIR     : Directory where object files are written  # BUILDDIR     : Directory where object files are written
1363  # SOURCEDIRS   : Directories containing the source (.F) files  # SOURCEDIRS   : Directories containing the source (.F) files

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.57

  ViewVC Help
Powered by ViewVC 1.1.22