2016-01-29 18:29:45 +00:00
|
|
|
#!/bin/sh
|
|
|
|
## Wrapper to portably run makedepend or equivalent compiler built-in.
|
|
|
|
## Runs on Makefile.in, generates Makefile
|
|
|
|
## {- join("\n## ", @autowarntext) -}
|
|
|
|
|
|
|
|
{- "MAKEDEPEND=" . quotify1($config{makedepprog}) -}
|
|
|
|
|
|
|
|
case "${MAKEDEPEND}" in
|
2016-01-30 00:50:28 +00:00
|
|
|
cat)
|
|
|
|
;;
|
2016-01-29 18:29:45 +00:00
|
|
|
makedepend)
|
2016-02-18 12:17:15 +00:00
|
|
|
${MAKEDEPEND} $@ || exit 1
|
2016-01-29 18:29:45 +00:00
|
|
|
;;
|
|
|
|
*)
|
2016-01-30 00:50:28 +00:00
|
|
|
args="-Werror -MM"
|
2016-01-29 18:29:45 +00:00
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
if [ "$1" != '--' ] ; then
|
|
|
|
args="$args $1"
|
|
|
|
fi
|
|
|
|
shift
|
|
|
|
done
|
2016-01-30 00:50:28 +00:00
|
|
|
sed -e '/DO NOT DELETE THIS LINE/q' Makefile >Makefile.tmp
|
2016-02-18 12:17:15 +00:00
|
|
|
${MAKEDEPEND} $args >>Makefile.tmp || exit 1
|
2016-01-30 00:50:28 +00:00
|
|
|
mv Makefile.tmp Makefile
|
2016-01-29 18:29:45 +00:00
|
|
|
;;
|
|
|
|
esac
|