/[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.216 by jmc, Mon Dec 13 22:07:20 2010 UTC revision 1.220 by jmc, Fri Jun 3 19:53:45 2011 UTC
# Line 96  Usage: "$0" [OPTIONS] Line 96  Usage: "$0" [OPTIONS]
96            will search for a working compiler by trying a list of            will search for a working compiler by trying a list of
97            "usual suspects" such as gcc, c89, cc, etc.            "usual suspects" such as gcc, c89, cc, etc.
98    
     -[no]ieee | --[no]ieee  
           Do or don't use IEEE numerics.  Note that this option  
           *only* works if it is supported by the OPTFILE that  
           is being used.  
   
99      -use_real4 | -use_r4 | -ur4 | --use_real4 | --use_r4 | --ur4      -use_real4 | -use_r4 | -ur4 | --use_real4 | --use_r4 | --ur4
100            Use "real*4" type for _RS variable (#undef REAL4_IS_SLOW)            Use "real*4" type for _RS variable (#undef REAL4_IS_SLOW)
101            *only* works if CPP_EEOPTIONS.h allows this.            *only* works if CPP_EEOPTIONS.h allows this.
# Line 126  Usage: "$0" [OPTIONS] Line 121  Usage: "$0" [OPTIONS]
121      -hpmt | --hpmt      -hpmt | --hpmt
122            Performance analysis with the HPM Toolkit            Performance analysis with the HPM Toolkit
123    
124      -gsl | --gsl      -ieee | --ieee
125            Use GSL to control floating point rounding and precision            use IEEE numerics.  Note that this option *only* works
126              if it is supported by the OPTFILE that is being used.
127      -devel | --devel      -devel | --devel
128            Add additional warning and debugging flags for development            Add additional warning and debugging flags for development
129              (if supported by the OPTFILE); also switch to IEEE numerics.
130        -gsl | --gsl
131              Use GSL to control floating point rounding and precision
132    
133      -mpi | --mpi      -mpi | --mpi
134            Include MPI header files and link to MPI libraries            Include MPI header files and link to MPI libraries
# Line 346  look_for_makedepend()  { Line 345  look_for_makedepend()  {
345      #    3) locally build and use the cyrus implementation      #    3) locally build and use the cyrus implementation
346      #    4) fall back to the buggy local xmakedpend script      #    4) fall back to the buggy local xmakedpend script
347      #      #
348        echo >> $LOGFILE
349        echo "running: look_for_makedepend()" >> $LOGFILE
350        if test "x${MAKEDEPEND}" != x ; then
351            echo "${MAKEDEPEND}" | grep -i cyrus > /dev/null 2>&1
352            RETVAL=$?
353            if test x"$RETVAL" = x0 ; then
354                build_cyrus_makedepend
355                RETVAL=$?
356                if test "x$RETVAL" != x0 ; then
357                    echo "WARNING: unable to build cyrus-makedepend. Try 'makedepend'"
358                    MAKEDEPEND=
359                fi
360            else
361                echo " -->     MAKEDEPEND=${MAKEDEPEND}" >> $LOGFILE
362            fi
363        fi
364      if test "x${MAKEDEPEND}" = x ; then      if test "x${MAKEDEPEND}" = x ; then
365          which makedepend > /dev/null 2>&1          which makedepend > /dev/null 2>&1
366          RV0=$?          RV0=$?
# Line 370  EOF Line 385  EOF
385          test -f $MAKEFILE".tst"  &&  mv -f $MAKEFILE".tst" $MAKEFILE          test -f $MAKEFILE".tst"  &&  mv -f $MAKEFILE".tst" $MAKEFILE
386          if test "x${RV0}${RV1}" = x00 ; then          if test "x${RV0}${RV1}" = x00 ; then
387              MAKEDEPEND=makedepend              MAKEDEPEND=makedepend
388                echo " --> set MAKEDEPEND=${MAKEDEPEND}" >> $LOGFILE
389          else          else
390              echo "    a system-default makedepend was not found."              echo "    system-default makedepend not found. Try to build cyrus-makedepend"
391              #  Try to build the cyrus implementation              #  Try to build the cyrus implementation
392              build_cyrus_makedepend              build_cyrus_makedepend
393              RETVAL=$?              RETVAL=$?
394              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
395                    echo "WARNING: unable to build cyrus-makedepend. Use local xmakedepend"
396                  MAKEDEPEND='$(TOOLSDIR)/xmakedepend'                  MAKEDEPEND='$(TOOLSDIR)/xmakedepend'
397                    echo " --> set MAKEDEPEND=${MAKEDEPEND}" >> $LOGFILE
398              fi              fi
             rm -f ./genmake_cy_md  
         fi  
     else  
         #  echo "MAKEDEPEND=${MAKEDEPEND}"  
         echo "${MAKEDEPEND}" | grep -i cyrus > /dev/null 2>&1  
         RETVAL=$?  
         if test x"$RETVAL" = x0 ; then  
             build_cyrus_makedepend  
399          fi          fi
400      fi      fi
401  }  }
402    
403  build_cyrus_makedepend()  {  build_cyrus_makedepend()  {
404        echo >> $LOGFILE
405        echo "running: build_cyrus_makedepend()" >> $LOGFILE
406      rm -f ./genmake_cy_md      rm -f ./genmake_cy_md
407      (      (
408          cd $ROOTDIR/tools/cyrus-imapd-makedepend  \          cd $ROOTDIR/tools/cyrus-imapd-makedepend  \
# Line 407  build_cyrus_makedepend()  { Line 419  build_cyrus_makedepend()  {
419      rm -f ./genmake_cy_md      rm -f ./genmake_cy_md
420      if test "x$RETVAL" = x0 ; then      if test "x$RETVAL" = x0 ; then
421          MAKEDEPEND='$(TOOLSDIR)/cyrus-imapd-makedepend/makedepend'          MAKEDEPEND='$(TOOLSDIR)/cyrus-imapd-makedepend/makedepend'
422            echo " --> set MAKEDEPEND=${MAKEDEPEND}" >> $LOGFILE
423          return 0          return 0
424      else      else
425          echo "WARNING: unable to build cyrus-imapd-makedepend"          echo "WARNING: fail to build cyrus-imapd-makedepend" >> $LOGFILE
426          return 1          return 1
427      fi      fi
428  }  }
# Line 1133  TAMC_EXTRA= Line 1146  TAMC_EXTRA=
1146    
1147  #  The following state can be set directly by command-line switches  #  The following state can be set directly by command-line switches
1148  gm_s1="OPTFILE PKG_DEPEND PKG_GROUPS MAKEFILE MAKEDEPEND PLATFORM ROOTDIR MODS DISABLE ENABLE"  gm_s1="OPTFILE PKG_DEPEND PKG_GROUPS MAKEFILE MAKEDEPEND PLATFORM ROOTDIR MODS DISABLE ENABLE"
1149  gm_s2="FC CC IEEE USE_R4 TS PAPIS PCLS PAPI PCL HPMT GSL DEVEL MPI OMP DUMPSTATE STANDARDDIRS"  gm_s2="FC CC USE_R4 TS PAPIS PCLS PAPI PCL HPMT IEEE DEVEL GSL MPI OMP DUMPSTATE STANDARDDIRS"
1150    
1151  #  The following state is not directly set by command-line switches  #  The following state is not directly set by command-line switches
1152  gm_s3="LN S64 LINK MAKE PACKAGES INCLUDES FFLAGS FOPTIM FEXTRAFLAGS"  gm_s3="LN S64 LINK MAKE PACKAGES INCLUDES FFLAGS FOPTIM FEXTRAFLAGS"
# Line 1297  for ac_option in "$@" ; do Line 1310  for ac_option in "$@" ; do
1310          -fs90=* | --fs90=*)          -fs90=* | --fs90=*)
1311              FS90=$ac_optarg ;;              FS90=$ac_optarg ;;
1312                    
1313            -use_real4 | -use_r4 | -ur4 | --use_real4 | --use_r4 | --ur4 )
1314                USE_R4=true ;;
1315    
1316          -ieee | --ieee)          -ieee | --ieee)
1317              IEEE=true ;;              IEEE=true ;;
1318          -noieee | --noieee)          -noieee | --noieee)
1319              IEEE= ;;              echo "Warning: ignore option '$ac_option' (default is already without '-ieee')" ;;
1320            -devel | --devel)
1321          -use_real4 | -use_r4 | -ur4 | --use_real4 | --use_r4 | --ur4 )              IEEE=true ; DEVEL=true ;;
1322              USE_R4=true ;;          -gsl | --gsl)
1323                GSL=true ;;
1324    
1325          -ts | --ts)          -ts | --ts)
1326              TS=true ;;              TS=true ;;
# Line 1320  for ac_option in "$@" ; do Line 1337  for ac_option in "$@" ; do
1337          -hpmt | --hpmt)          -hpmt | --hpmt)
1338              HPMT=true ;;              HPMT=true ;;
1339    
         -gsl | --gsl)  
             GSL=true ;;  
   
         -devel | --devel)  
             DEVEL=true ;;  
   
1340          -mpi | --mpi)          -mpi | --mpi)
1341              MPI=true ;;              MPI=true ;;
1342          -mpi=* | --mpi=*)          -mpi=* | --mpi=*)
# Line 1376  if test -f ./.genmakerc ; then Line 1387  if test -f ./.genmakerc ; then
1387      echo "WARNING: genmake2 has detected a copy of the old-style \"./.genmakerc\""      echo "WARNING: genmake2 has detected a copy of the old-style \"./.genmakerc\""
1388      echo "  file.  This file format is no longer supported.  For directions on"      echo "  file.  This file format is no longer supported.  For directions on"
1389      echo "  how to setup and use the new \"genmake2\" script, please see:"      echo "  how to setup and use the new \"genmake2\" script, please see:"
1390      echo "    http://mitgcm.org/devel_HOWTO/"      echo "    http://mitgcm.org/public/devel_HOWTO/"
1391      echo "  and send an email to MITgcm-support@mitgcm.org if you need help."      echo "  and send an email to MITgcm-support@mitgcm.org if you need help."
1392      echo "WARNING: ignore \"./.genmakerc\" and continue."      echo "WARNING: ignore \"./.genmakerc\" and continue."
1393      echo      echo
# Line 1391  if test "x${ROOTDIR}" = x ; then Line 1402  if test "x${ROOTDIR}" = x ; then
1402          for d in . .. ../.. ../../.. ../../../.. ../../../../.. ; do          for d in . .. ../.. ../../.. ../../../.. ../../../../.. ; do
1403              if [ -d "$d/model" -a -d "$d/eesupp" -a -d "$d/pkg" ]; then              if [ -d "$d/model" -a -d "$d/eesupp" -a -d "$d/pkg" ]; then
1404                  ROOTDIR=$d                  ROOTDIR=$d
1405                  printf "Warning:  ROOTDIR was not specified but there appears to be"                  printf "Warning: ROOTDIR was not specified ;"
1406                  echo " a copy of MITgcm at \"$ROOTDIR\" so we'll try it."                  echo " try using a local copy of MITgcm found at \"$ROOTDIR\""
1407                  break                  break
1408              fi              fi
1409          done          done
# Line 1502  fi Line 1513  fi
1513  if test "x$GET_FC_VERSION" != x ; then  if test "x$GET_FC_VERSION" != x ; then
1514    echo "Get compiler version using: $FC $GET_FC_VERSION" >> $LOGFILE    echo "Get compiler version using: $FC $GET_FC_VERSION" >> $LOGFILE
1515    $FC $GET_FC_VERSION >> $LOGFILE 2>&1    $FC $GET_FC_VERSION >> $LOGFILE 2>&1
1516    echo "--- compiler version ----" >> $LOGFILE    echo "<-- compiler version ----" >> $LOGFILE
1517  fi  fi
1518    
1519  if test "x$CC" = x ; then  if test "x$CC" = x ; then
# Line 2705  Clean: Line 2716  Clean:
2716  CLEAN:  CLEAN:
2717          @make Clean          @make Clean
2718          -rm -f \$(EXECUTABLE) \$(EXE_AD) *.bak          -rm -f \$(EXECUTABLE) \$(EXE_AD) *.bak
2719          -rm -f $LOGFILE genmake_state genmake_*optfile genmake.tr_log make.tr_log          -rm -f $LOGFILE genmake_state genmake_*optfile
2720            -rm -f SIZE.h.mpi genmake.tr_log make.tr_log
2721          -find \$(EXEDIR) -name "*.meta" -exec rm {} \;          -find \$(EXEDIR) -name "*.meta" -exec rm {} \;
2722          -find \$(EXEDIR) -name "*.data" -exec rm {} \;          -find \$(EXEDIR) -name "*.data" -exec rm {} \;
2723          -find \$(EXEDIR) -name "fort.*" -exec rm {} \;          -find \$(EXEDIR) -name "fort.*" -exec rm {} \;

Legend:
Removed from v.1.216  
changed lines
  Added in v.1.220

  ViewVC Help
Powered by ViewVC 1.1.22