1 |
#!/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 |
# |
# |
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 |
CPPARGS="-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 |
CC="/lib/cpp $CPPARGS" |
CPPARGS="-traditional $CPPARGS" |
33 |
|
|
34 |
|
CC="cpp $CPPARGS" |
35 |
|
if test -x /lib/cpp ; then |
36 |
|
CC="/lib/cpp $CPPARGS" |
37 |
|
fi |
38 |
|
|
39 |
silent='-' |
silent='-' |
40 |
|
|
170 |
;; |
;; |
171 |
esac |
esac |
172 |
|
|
173 |
if [ "$verbose"x = "y"x ]; then |
if [ "$verbose"x = "y"x ]; then |
174 |
cat $CPPCMD |
cat $CPPCMD |
175 |
fi |
fi |
176 |
|
|
179 |
do |
do |
180 |
$CPPCMD $i | sed -n "/^#/s;^;$i ;p" |
$CPPCMD $i | sed -n "/^#/s;^;$i ;p" |
181 |
|
|
182 |
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 '!/<.*>/{ |
183 |
if ($1 != $4 && $2 != "#ident" && $2 != "#pragma") |
if ($1 != $4 && $2 != "#ident" && $2 != "#pragma") |
184 |
|
|
|
|
|
|
|
|
185 |
{ |
{ |
186 |
ofile = substr ($1, 1, length ($1) - 2) "'"$objsuffix"'" |
ofile = substr ($1, 1, length ($1) - 2) "'"$objsuffix"'" |
187 |
print ofile, $4 |
print ofile, $4 |
251 |
$TMPMAKEFILE) |
$TMPMAKEFILE) |
252 |
cat $TMPMAKEFILE |
cat $TMPMAKEFILE |
253 |
;; |
;; |
|
|
|
254 |
esac |
esac |
255 |
|
|
256 |
rm -f ${TMP}* |
rm -f ${TMP}* |