diff options
author | obrien <obrien@FreeBSD.org> | 1998-09-13 09:39:39 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1998-09-13 09:39:39 +0000 |
commit | 3e147c2c7037039e19834af89f725d320f6eb4fe (patch) | |
tree | d3337d8610b9d7a5cb89473b09abb50a4729cb02 /usr.bin/mkdep/mkdep.gcc.sh | |
parent | 84e77be3da28727e64cff32a1c4a3e1f43f8711f (diff) | |
download | FreeBSD-src-3e147c2c7037039e19834af89f725d320f6eb4fe.zip FreeBSD-src-3e147c2c7037039e19834af89f725d320f6eb4fe.tar.gz |
Remove -n for ignoring system headers. Instead add finer grain shell
macros and document them.
Prompted by: bde
Diffstat (limited to 'usr.bin/mkdep/mkdep.gcc.sh')
-rw-r--r-- | usr.bin/mkdep/mkdep.gcc.sh | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/usr.bin/mkdep/mkdep.gcc.sh b/usr.bin/mkdep/mkdep.gcc.sh index 907a9f3..ff4e2f3 100644 --- a/usr.bin/mkdep/mkdep.gcc.sh +++ b/usr.bin/mkdep/mkdep.gcc.sh @@ -32,11 +32,10 @@ # SUCH DAMAGE. # # @(#)mkdep.gcc.sh 8.1 (Berkeley) 6/6/93 -# $Id: mkdep.gcc.sh,v 1.15 1998/08/29 07:55:55 obrien 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 : @@ -51,11 +50,6 @@ 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) @@ -78,16 +72,13 @@ trap 'rm -f $TMP' 0 # For C sources, mkdep must use exactly the same cpp and predefined flags # as the compiler would. This is easily arranged by letting the compiler # pick the cpp. mkdep must be told the cpp to use for exceptional cases. -MKDEP_CPP=${MKDEP_CPP-"cc -E"} - -case $nosyshdrs in - 0) CC_MKDEP_OPT="-M";; - *) CC_MKDEP_OPT="-MM -w";; -esac +CC=${CC-"cc"} +MKDEP_CPP=${MKDEP_CPP-"${CC} -E"} +MKDEP_CPP_OPTS=${MKDEP_CPP_OPTS-"-M"}; echo "# $@" > $TMP # store arguments for debugging -if $MKDEP_CPP $CC_MKDEP_OPT "$@" >> $TMP; then : +if $MKDEP_CPP $MKDEP_CPP_OPTS "$@" >> $TMP; then : else echo 'mkdep: compile failed' >&2 exit 1 |