diff options
author | obrien <obrien@FreeBSD.org> | 1998-08-29 07:55:55 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1998-08-29 07:55:55 +0000 |
commit | 78e95f775c29ac8f5a2a68a414d93f853abcc91e (patch) | |
tree | f17c7411c95913557580b1d4d8b7734b6a1fd09c /usr.bin/mkdep/mkdep.gcc.sh | |
parent | 6deeb3dc120596bf1e5dbc28cf463941115f4a12 (diff) | |
download | FreeBSD-src-78e95f775c29ac8f5a2a68a414d93f853abcc91e.zip FreeBSD-src-78e95f775c29ac8f5a2a68a414d93f853abcc91e.tar.gz |
Add option `-n', causing system headers not to be included in dependacy
lists.
This is needed when using a non-stock compiler.
Diffstat (limited to 'usr.bin/mkdep/mkdep.gcc.sh')
-rw-r--r-- | usr.bin/mkdep/mkdep.gcc.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/usr.bin/mkdep/mkdep.gcc.sh b/usr.bin/mkdep/mkdep.gcc.sh index 157210a..9a07c9d 100644 --- a/usr.bin/mkdep/mkdep.gcc.sh +++ b/usr.bin/mkdep/mkdep.gcc.sh @@ -32,10 +32,11 @@ # SUCH DAMAGE. # # @(#)mkdep.gcc.sh 8.1 (Berkeley) 6/6/93 -# $Id: mkdep.gcc.sh,v 1.13 1998/08/17 11:43:25 jb Exp $ +# $Id: mkdep.gcc.sh,v 1.14 1998/08/24 10:16:39 cracauer Exp $ D=.depend # default dependency file is .depend append=0 +nosyshdrs=0 pflag= while : @@ -50,6 +51,11 @@ while : D=$2 shift; shift ;; + # -n does not make dependencies on system headers + -n) + nosyshdrs=1 + shift ;; + # the -p flag produces "program: program.c" style dependencies # so .o's don't get produced -p) @@ -74,9 +80,14 @@ trap 'rm -f $TMP' 0 # pick the cpp. mkdep must be told the cpp to use for exceptional cases. MKDEP_CPP=${MKDEP_CPP-"cc -E"} +case $append in + 0) CC_MKDEP_OPT="-M";; + *) CC_MKDEP_OPT="-MM -w";; +esac + echo "# $@" > $TMP # store arguments for debugging -if $MKDEP_CPP -M "$@" >> $TMP; then : +if $MKDEP_CPP $CC_MKDEP_OPT "$@" >> $TMP; then : else echo 'mkdep: compile failed' >&2 exit 1 |