/[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.118 by edhill, Wed Feb 9 17:34:19 2005 UTC revision 1.119 by edhill, Wed Mar 9 19:57:00 2005 UTC
# Line 122  EOF Line 122  EOF
122        stop        stop
123        end        end
124  EOF  EOF
125      test -f Makefile  &&  mv -f Makefile Makefile.bak      test -f $MAKEFILE  &&  mv -f $MAKEFILE $MAKEFILE".tst"
126      cat <<EOF >> Makefile      cat <<EOF >> $MAKEFILE
127  .SUFFIXES:  .SUFFIXES:
128  .SUFFIXES: .$tfs .F  .SUFFIXES: .$tfs .F
129  .F.$tfs:  .F.$tfs:
# Line 148  EOF Line 148  EOF
148              return              return
149          fi          fi
150      fi      fi
151      rm -f genmake_hello.* Makefile      rm -f genmake_hello.* $MAKEFILE
152      test -f Makefile  &&  mv -f Makefile.bak Makefile      test -f $MAKEFILE".tst"  &&  mv -f $MAKEFILE".tst" $MAKEFILE
153    
154      #  If we make it here, use the extensions      #  If we make it here, use the extensions
155      FS=$tfs      FS=$tfs
# Line 181  look_for_makedepend()  { Line 181  look_for_makedepend()  {
181      if test "x${MAKEDEPEND}" = x ; then      if test "x${MAKEDEPEND}" = x ; then
182          which makedepend > /dev/null 2>&1          which makedepend > /dev/null 2>&1
183          RV0=$?          RV0=$?
184            test -f $MAKEFILE  &&  mv -f $MAKEFILE $MAKEFILE".tst"
185            #  echo 'MAKEFILE="'$MAKEFILE'"'
186            cat <<EOF >> $MAKEFILE
187    #   THIS IS A TEST MAKEFILE GENERATED BY "genmake2"
188    #
189    #   Some "makedepend" implementations will die if they cannot
190    #   find a Makefile -- so this file is here to gives them an
191    #   empty one to find and parse.
192    EOF
193          cat <<EOF >> genmake_tc.f          cat <<EOF >> genmake_tc.f
194        program test        program test
195        write(*,*) 'test'        write(*,*) 'test'
# Line 188  look_for_makedepend()  { Line 197  look_for_makedepend()  {
197        end        end
198  EOF  EOF
199          makedepend genmake_tc.f > /dev/null 2>&1          makedepend genmake_tc.f > /dev/null 2>&1
200            test -f $MAKEFILE  &&  rm -f $MAKEFILE
201            test -f $MAKEFILE".tst"  &&  mv -f $MAKEFILE".tst" $MAKEFILE
202          RV1=$?          RV1=$?
203          if test "x${RV0}${RV1}" = x00 ; then          if test "x${RV0}${RV1}" = x00 ; then
204              MAKEDEPEND=makedepend              MAKEDEPEND=makedepend
# Line 804  DEFINES= Line 815  DEFINES=
815  PACKAGES=  PACKAGES=
816  ENABLE=  ENABLE=
817  DISABLE=  DISABLE=
818  MAKEFILE=  # MAKEFILE=
819  #MAKEDEPEND=  # MAKEDEPEND=
820  PDEPEND=  PDEPEND=
821  DUMPSTATE=t  DUMPSTATE=t
822  PDEFAULT=  PDEFAULT=
# Line 1095  for ac_option in "$@" ; do Line 1106  for ac_option in "$@" ; do
1106            
1107  done  done
1108    
1109    
1110  if test -f ./.genmakerc ; then  if test -f ./.genmakerc ; then
1111      echo      echo
1112      echo "WARNING: genmake2 has detected a copy of the old-style \"./.genmakerc\""      echo "WARNING: genmake2 has detected a copy of the old-style \"./.genmakerc\""
# Line 1139  if test -f "${ROOTDIR}/doc/tag-index" ; Line 1151  if test -f "${ROOTDIR}/doc/tag-index" ;
1151      THISVER=`grep checkpoint ${ROOTDIR}/doc/tag-index | head -1`      THISVER=`grep checkpoint ${ROOTDIR}/doc/tag-index | head -1`
1152  fi  fi
1153    
1154    if test "x$MAKEFILE" = x ; then
1155        MAKEFILE="Makefile"
1156    fi
1157    
1158  echo "  getting OPTFILE information:  "  echo "  getting OPTFILE information:  "
1159  if test "x${OPTFILE}" = x ; then  if test "x${OPTFILE}" = x ; then
1160      if test "x$MITGCM_OF" = x ; then      if test "x$MITGCM_OF" = x ; then
# Line 1168  if test "x$OPTFILE" != xNONE ; then Line 1184  if test "x$OPTFILE" != xNONE ; then
1184      fi      fi
1185  fi  fi
1186    
 #  Check for broken systems that cannot correctly distinguish *.F and *.f files  
 # check_for_broken_Ff  
   
1187  echo "  getting AD_OPTFILE information:  "  echo "  getting AD_OPTFILE information:  "
1188  if test "x${AD_OPTFILE}" = x ; then  if test "x${AD_OPTFILE}" = x ; then
1189      if test "x$MITGCM_AD_OF" = x ; then      if test "x$MITGCM_AD_OF" = x ; then
# Line 1198  if test "x${AD_OPTFILE}" != xNONE ; then Line 1211  if test "x${AD_OPTFILE}" != xNONE ; then
1211      fi      fi
1212  fi  fi
1213    
1214    #====================================================================
1215    #  Set default values if not set by the optfile
1216    #
1217  #  Check that FC, CC, LINK, CPP, S64, LN, and MAKE are defined.  If not,  #  Check that FC, CC, LINK, CPP, S64, LN, and MAKE are defined.  If not,
1218  #  either set defaults or complain and abort!  #  either set defaults or complain and abort!
1219  if test ! "x$BASH" = x ; then  if test ! "x$BASH" = x ; then
# Line 1388  for d in $MODS ; do Line 1404  for d in $MODS ; do
1404  done  done
1405  echo  echo
1406    
 if test "x$MAKEFILE" = x ; then  
     MAKEFILE="Makefile"  
 fi  
1407  if test "x${PLATFORM}" = x ; then  if test "x${PLATFORM}" = x ; then
1408      PLATFORM=$p_PLATFORM      PLATFORM=$p_PLATFORM
1409  fi  fi

Legend:
Removed from v.1.118  
changed lines
  Added in v.1.119

  ViewVC Help
Powered by ViewVC 1.1.22