mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
f1f07a2367
Iteratively improved with Richard and Andy. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
27 lines
660 B
Bash
Executable File
27 lines
660 B
Bash
Executable File
#!/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
|
|
cat)
|
|
;;
|
|
makedepend)
|
|
${MAKEDEPEND} -DOPENSSL_DOING_MAKEDEPEND $@ || exit 1
|
|
;;
|
|
*)
|
|
args="-Werror -MM"
|
|
while [ $# -gt 0 ]; do
|
|
if [ "$1" != '--' ] ; then
|
|
args="$args $1"
|
|
fi
|
|
shift
|
|
done
|
|
sed -e '/DO NOT DELETE THIS LINE/q' Makefile >Makefile.tmp
|
|
${MAKEDEPEND} -DOPENSSL_DOING_MAKEDEPEND $args >>Makefile.tmp || exit 1
|
|
mv Makefile.tmp Makefile
|
|
;;
|
|
esac
|