/[MITgcm]/MITgcm/tools/xmakedepend
ViewVC logotype

Diff of /MITgcm/tools/xmakedepend

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.10 by jmc, Fri Apr 5 13:47:19 2013 UTC revision 1.11 by jmc, Thu Aug 22 01:12:20 2013 UTC
# Line 26  Line 26 
26  #       "-" (at least, that is what the documentation implies).  #       "-" (at least, that is what the documentation implies).
27  #  #
28  # $XFree86: xc/config/util/mdepend.cpp,v 3.2 1997/06/29 07:54:20 dawes Exp $  # $XFree86: xc/config/util/mdepend.cpp,v 3.2 1997/06/29 07:54:20 dawes Exp $
 #  
29    
30  CPPARGS="-Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE  -D_GNU_SOURCE  "  CPPARGS="-Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE  -D_GNU_SOURCE  "
31  CPPARGS="-traditional $CPPARGS"  CPPARGS="-traditional $CPPARGS"
# Line 39  fi Line 38  fi
38  silent='-'  silent='-'
39    
40  TMP=./mdep$$  TMP=./mdep$$
41    #- try to put temporary files in system-local /tmp dir
42    #TMP=/tmp/mdep$$
43    #touch $TMP ; retVal=$?
44    #if [ $retVal -eq 0 ] ; then
45    #  if test ! -r $TMP ; then TMP=./mdep$$ ; fi
46    #else
47    #  TMP=./mdep$$
48    #fi
49    #rm -f $TMP
50    ##echo "temp files: $TMP"
51    
52  CPPCMD=${TMP}a  CPPCMD=${TMP}a
53  DEPENDLINES=${TMP}b  DEPENDLINES=${TMP}b
54  TMPMAKEFILE=${TMP}c  TMPMAKEFILE=${TMP}c
# Line 188  done   | sed -e 's|/[^/.][^/]*/\.\.||g' Line 198  done   | sed -e 's|/[^/.][^/]*/\.\.||g'
198              }              }
199          }'   | sort -u   | awk '          }'   | sort -u   | awk '
200    
   
201              {              {
202              newrec = rec " " $2              newrec = rec " " $2
203              if ($1 != old1)              if ($1 != old1)
# Line 212  done   | sed -e 's|/[^/.][^/]*/\.\.||g' Line 221  done   | sed -e 's|/[^/.][^/]*/\.\.||g'
221                  print rec                  print rec
222              }'   | egrep -v '^[^:]*:[   ]*$' >> $DEPENDLINES              }'   | egrep -v '^[^:]*:[   ]*$' >> $DEPENDLINES
223    
   
224  trap "" 1 2 13 15       # Now we are committed  trap "" 1 2 13 15       # Now we are committed
225  case "$makefile" in  case "$makefile" in
226      $TMPMAKEFILE)      $TMPMAKEFILE)
# Line 224  case "$makefile" in Line 232  case "$makefile" in
232          ;;          ;;
233  esac  esac
234    
 #  
235  # If not -a, append the magic string and a blank line so that  # If not -a, append the magic string and a blank line so that
236  # /^$magic_string/+1,\$d can be used to delete everything from after  # /^$magic_string/+1,\$d can be used to delete everything from after
237  # the magic string to the end of the file.  Then, append a blank  # the magic string to the end of the file.  Then, append a blank
238  # line again and then the dependencies.  # line again and then the dependencies.
 #  
239  if [ "$append" = "n" ]  if [ "$append" = "n" ]
240  then  then
241      cat >> $makefile << END_OF_APPEND      cat >> $makefile << END_OF_APPEND

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.22