/[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.1.6.1 by heimbach, Mon Apr 8 20:10:39 2002 UTC revision 1.8 by jmc, Tue Mar 16 00:59:38 2010 UTC
# Line 1  Line 1 
1  #!/usr/bin/sh  #! /usr/bin/env sh
2    #
3    # $Header$
4    # $Name$
5  #  #
6  # $TOG: mdepend.cpp /main/13 1997/06/20 21:12:18 kaleb $  # $TOG: mdepend.cpp /main/13 1997/06/20 21:12:18 kaleb $
7  #  #
# Line 25  Line 28 
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    
31  CC="cpp -traditional -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  "
32    
33    CC="cpp $CPPARGS"
34    if test -x /lib/cpp ; then
35        CC="/lib/cpp $CPPARGS"
36    fi
37    
38  silent='-'  silent='-'
39    
# Line 118  do Line 126  do
126                              shift                              shift
127                              ;;                              ;;
128    
129                            -cpp)
130                                CC="$2 $CPPARGS"
131                                shift
132                                ;;
133    
134                          -*)                          -*)
135                              echo "Unknown option '$1' ignored" 1>&2                              echo "Unknown option '$1' ignored" 1>&2
136                              ;;                              ;;
# Line 156  case "$makefile" in Line 169  case "$makefile" in
169          ;;          ;;
170  esac  esac
171    
172  if [ "$verbose"x = "y"x ]; then  if [ "$verbose"x = "y"x ]; then
173      cat $CPPCMD      cat $CPPCMD
174  fi  fi
175    
# Line 165  for i in $files Line 178  for i in $files
178  do  do
179      $CPPCMD $i       | sed -n "/^#/s;^;$i ;p"      $CPPCMD $i       | sed -n "/^#/s;^;$i ;p"
180    
181  done   | sed -e 's|/[^/.][^/]*/\.\.||g' -e 's|/\.[^.][^/]*/\.\.||g'     -e 's|"||g' -e 's| \./| |'   | awk '{  done   | sed -e 's|/[^/.][^/]*/\.\.||g' -e 's|/\.[^.][^/]*/\.\.||g'     -e 's|"||g' -e 's| \./| |'   | awk '!/<.*>/{
182          if ($1 != $4  &&  $2 != "#ident" && $2 != "#pragma")          if ($1 != $4  &&  $2 != "#ident" && $2 != "#pragma")
183    
   
   
184              {              {
185              ofile = substr ($1, 1, length ($1) - 2) "'"$objsuffix"'"              ofile = substr ($1, 1, length ($1) - 2) "'"$objsuffix"'"
186              print ofile, $4              print ofile, $4
# Line 239  case "$makefile" in Line 250  case "$makefile" in
250      $TMPMAKEFILE)      $TMPMAKEFILE)
251          cat $TMPMAKEFILE          cat $TMPMAKEFILE
252          ;;          ;;
   
253  esac  esac
254    
255  rm -f ${TMP}*  rm -f ${TMP}*

Legend:
Removed from v.1.1.6.1  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22