/[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.68 by adcroft, Tue Feb 24 19:14:18 2004 UTC revision 1.69 by edhill, Wed Feb 25 19:12:10 2004 UTC
# Line 100  find_possible_configs()  { Line 100  find_possible_configs()  {
100          CPP="cpp -traditional -P"          CPP="cpp -traditional -P"
101      fi      fi
102    
103      # makedepend is not always available      #  The "original" makedepend is part of the Imake system that is
104        #  most often distributed with XFree86 or with an XFree86 source
105        #  package.  As a result, many machines (eg. generic Linux) do not
106        #  have a system-default "makedepend" available.  For those
107        #  systems, we have two fall-back options:
108        #
109        #    1) a makedepend implementation shipped with the cyrus-imapd
110        #       package:  ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/
111        #
112        #    2) a known-buggy xmakedpend shell script
113        #
114        #  So the choices are, in order:
115        #
116        #    1) use the user-specified program
117        #    2) use a system-wide default
118        #    3) locally build and use the cyrus implementation
119        #    4) fall back to the buggy local xmakedpend script
120        #
121      if test "x${MAKEDEPEND}" = x ; then      if test "x${MAKEDEPEND}" = x ; then
122        which makedepend >& /dev/null        which makedepend >& /dev/null
123        RETVAL=$?        RETVAL=$?
124        if test "x${RETVAL}" = x1 ; then        if test ! "x${RETVAL}" = x0 ; then
125           echo "    makedepend was not found. Using xmakedpend instead."           echo "    a system-default makedepend was not found."
126           MAKEDEPEND='$(TOOLSDIR)/xmakedepend'  
127             #  Try to build the cyrus impl
128             rm -f ./genmake_cy_md
129             (
130                 cd $ROOTDIR/tools/cyrus-imapd-makedepend  \
131                     &&  ./configure > /dev/null 2>&1  \
132                     &&  make > /dev/null 2>&1  \
133                     &&  ./makedepend ifparser.c > /dev/null 2>&1  \
134                     &&  echo "true"
135             ) > ./genmake_cy_md
136             grep true ./genmake_cy_md > /dev/null 2>&1
137             RETVAL=$?
138             if test "x$RETVAL" = x0 ; then
139                 MAKEDEPEND='$(TOOLSDIR)/cyrus-imapd-makedepend/makedepend'
140             else
141                 MAKEDEPEND='$(TOOLSDIR)/xmakedepend'
142             fi
143             rm -f ./genmake_cy_md
144        fi        fi
145      fi      fi
146    
# Line 262  Usage: "$0" [OPTIONS] Line 296  Usage: "$0" [OPTIONS]
296        --makefile=NAME | -mf=NAME        --makefile=NAME | -mf=NAME
297            Call the makefile "NAME".  The default is "Makefile".            Call the makefile "NAME".  The default is "Makefile".
298    
299        -makedepend NAME | -md NAME
300          --makedepend=NAME | -md=NAME
301              Use "NAME" for the MAKEDEPEND program.
302    
303      -rootdir NAME | --rootdir NAME | -rd NAME | --rd NAME      -rootdir NAME | --rootdir NAME | -rd NAME | --rd NAME
304        -rootdir=NAME | --rootdir=NAME | -rd=NAME | --rd=NAME        -rootdir=NAME | --rootdir=NAME | -rd=NAME | --rd=NAME
305            Specify the location of the MITgcm ROOTDIR as "NAME".            Specify the location of the MITgcm ROOTDIR as "NAME".
# Line 676  for ac_option ; do Line 714  for ac_option ; do
714          -make=* | --make=* | -m=* | --m=*)          -make=* | --make=* | -m=* | --m=*)
715              MAKE=$ac_optarg ;;              MAKE=$ac_optarg ;;
716                    
717            -makedepend | --makedepend | -md | --md)
718                ac_prev=MAKEDEPEND ;;
719            -makedepend=* | --makedepend=* | -md=* | --md=*)
720                MAKEDEPEND=$ac_optarg ;;
721            
722          -makefile | --makefile | -ma | --ma)          -makefile | --makefile | -ma | --ma)
723              ac_prev=MAKEFILE ;;              ac_prev=MAKEFILE ;;
724          -makefile=* | --makefile=* | -ma=* | --ma=*)          -makefile=* | --makefile=* | -ma=* | --ma=*)

Legend:
Removed from v.1.68  
changed lines
  Added in v.1.69

  ViewVC Help
Powered by ViewVC 1.1.22