/[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.53 by edhill, Fri Dec 5 15:08:33 2003 UTC revision 1.58 by afe, Fri Jan 9 22:08:39 2004 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 960  if test -r $ROOTDIR"/eesupp/src/Makefile Line 962  if test -r $ROOTDIR"/eesupp/src/Makefile
962      fi      fi
963  fi  fi
964    
965    #same for exch2
966    if test -r $ROOTDIR"/pkg/exch2/Makefile" ; then
967        echo "  Making source files in exch2 from  templates"
968        ( cd $ROOTDIR"/pkg/exch2/" && $MAKE ) > make_exch2.errors 2>&1
969        RETVAL=$?
970        if test "x${RETVAL}" = x0 ; then
971            rm -f make_exch2.errors
972        else
973            echo "Error: problem encountered while building source files in exch2:"        cat make_exch2.errors
974            exit 1
975        fi
976    fi
977    
978  printf "\n===  Determining package settings  ===\n"  printf "\n===  Determining package settings  ===\n"
979  if  test "x${PDEPEND}" = x ; then  if  test "x${PDEPEND}" = x ; then
980      tmp=$ROOTDIR"/pkg/pkg_depend"      tmp=$ROOTDIR"/pkg/pkg_depend"
# Line 1177  for i in $PACKAGES ; do Line 1192  for i in $PACKAGES ; do
1192  #EH3  WARNING :  This is an UGLY HACK that needs to be removed!!!  #EH3  WARNING :  This is an UGLY HACK that needs to be removed!!!
1193      case $i in      case $i in
1194          aim_v23)          aim_v23)
             DEFINES="$DEFINES -DALLOW_AIM"  
1195              ENABLED_PACKAGES="$ENABLED_PACKAGES -DALLOW_AIM"              ENABLED_PACKAGES="$ENABLED_PACKAGES -DALLOW_AIM"
1196              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."
1197              ;;              ;;
1198      esac      esac
1199  #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 1202  done
1202    
1203  echo "  Adding STANDARDDIRS"  echo "  Adding STANDARDDIRS"
1204  BUILDDIR=${BUILDDIR:-.}  BUILDDIR=${BUILDDIR:-.}
1205  if test "x$STANDARDDIRS" = x ; then  if test "x$STANDARDDIRS" = xUSE_THE_DEFAULT ; then
1206      STANDARDDIRS="eesupp model"      STANDARDDIRS="eesupp model"
1207  fi  fi
1208  for d in $STANDARDDIRS ; do  if test "x$STANDARDDIRS" != x ; then
1209      adr="$ROOTDIR/$d/src"      for d in $STANDARDDIRS ; do
1210      if test ! -d $adr ; then          adr="$ROOTDIR/$d/src"
1211          echo "Error:  directory $adr not found -- please check that ROOTDIR=\"$ROOTDIR\""          if test ! -d $adr ; then
1212          echo "  is correct and that you correctly specified the STANDARDDIRS option"              echo "Error:  directory $adr not found -- please check that ROOTDIR=\"$ROOTDIR\""
1213          exit 1              echo "  is correct and that you correctly specified the STANDARDDIRS option"
1214      else              exit 1
1215          SOURCEDIRS="$SOURCEDIRS $adr"          else
1216      fi              SOURCEDIRS="$SOURCEDIRS $adr"
1217      adr="$ROOTDIR/$d/inc"          fi
1218      if test ! -d $adr ; then          adr="$ROOTDIR/$d/inc"
1219          echo "Error:  directory $adr not found -- please check that ROOTDIR=\"$ROOTDIR\""          if test ! -d $adr ; then
1220          echo "  is correct and that you correctly specified the STANDARDDIRS option"              echo "Error:  directory $adr not found -- please check that ROOTDIR=\"$ROOTDIR\""
1221          exit 1              echo "  is correct and that you correctly specified the STANDARDDIRS option"
1222      else              exit 1
1223          INCLUDEDIRS="$INCLUDEDIRS $adr"          else
1224      fi              INCLUDEDIRS="$INCLUDEDIRS $adr"
1225  done          fi
1226        done
1227    fi
1228    
1229  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"
1230  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 1234  spaths=". $INCLUDEDIRS"
1234  names=`ls -1 "$ROOTDIR/pkg"`  names=`ls -1 "$ROOTDIR/pkg"`
1235  for i in $spaths ; do  for i in $spaths ; do
1236      try="$i/CPP_OPTIONS.h"      try="$i/CPP_OPTIONS.h"
1237      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
1238          echo "    found CPP_OPTIONS=\"$try\""          echo "    found CPP_OPTIONS=\"$try\""
1239          CPP_OPTIONS="$try"          CPP_OPTIONS="$try"
1240          # 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 1243  for i in $spaths ; do
1243          done          done
1244      fi      fi
1245      try="$i/CPP_EEOPTIONS.h"      try="$i/CPP_EEOPTIONS.h"
1246      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
1247          echo "    found CPP_EEOPTIONS=\"$try\""          echo "    found CPP_EEOPTIONS=\"$try\""
1248          # 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
1249  #**** not yet enabled ****  #**** not yet enabled ****

Legend:
Removed from v.1.53  
changed lines
  Added in v.1.58

  ViewVC Help
Powered by ViewVC 1.1.22