for review: mmake: turn off undefined variable warnings
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Jul 10 05:44:50 AEST 1998
scripts/mmake.in:
Make the warnings about undefined variables optional,
with the default being that they are not enabled.
Index: scripts/mmake.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mmake.in,v
retrieving revision 1.25
diff -u -r1.25 mmake.in
--- mmake.in 1998/06/28 07:46:09 1.25
+++ mmake.in 1998/07/09 19:38:11
@@ -30,6 +30,11 @@
your Mmake file.
-v, --verbose:
Print verbose progress messages.
+ -w, --warn-undefined-vars:
+ Warn about variable which are used but not defined.
+ (This warning is disabled when doing \`mmake clean'
+ or \`mmake depend' or the like, to avoid spurious
+ warnings when the dependencies have not yet been made.)
-h, --help:
Print this usage message.
Targets:
@@ -71,6 +76,7 @@
else
use_subdirs=${MMAKE_USE_SUBDIRS=no}
fi
+warn_undefined_vars=false
while [ $# -gt 0 ]; do
case "$1" in
@@ -106,6 +112,14 @@
MMAKE="$MMAKE $1"
shift
;;
+ -w|--warn-undefined-vars)
+ warn_undefined_vars=true
+ shift
+ ;;
+ -w-|--no-warn-undefined-vars)
+ warn_undefined_vars=false
+ shift
+ ;;
--)
MMAKE="$MMAKE $1"
shift
@@ -191,7 +205,10 @@
MMAKE_MAKE_OPTS=""
;;
*)
- MMAKE_MAKE_OPTS="--warn-undefined-variables"
+ case $warn_undefined_vars in)
+ true) MMAKE_MAKE_OPTS="--warn-undefined-variables" ;;
+ false) MMAKE_MAKE_OPTS="" ;;
+ esac
;;
esac
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list