Tag
Hash :
e5b84c37
Author :
Date :
2002-07-12T08:00:57
* automake.in: Register warning channel `gnu'. (set_strictness): Turn on `gnu' in --gnu and --gnits. (usage): Mention the `gnu' category. (%var_is_am): Replace by ... (%var_owner): ... this, which uses ... (VAR_AUTOMAKE, VAR_CONFIGURE, VAR_MAKEFILE): ... these new constants. Adjust all uses of %var_is_am. (handle_languages): Warn about user variables being overriden. (require_variables): Also check %configure_vars for the existence of a required variable. * automake.texi (Invoking Automake): Document -Wgnu. * tests/yacc2.test, tests/yacc3.test: Use -Wno-gnu when we test YFLAGS. * tests/gnuwarn.test: New file. * tests/Makefile.am (TESTS): Add gnuwarn.test.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
#! /bin/sh
# Check that Automake warns about user variables being overriden.
. $srcdir/defs || exit 1
set -e
cat >> configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
END
# Needed by --gnu.
: > NEWS
: > README
: > AUTHORS
: > ChangeLog
cat > Makefile.am << 'END'
CFLAGS = -I..
LDFLAGS = -lfoo
CXXFLAGS = -Wall
bin_PROGRAMS = bar
END
$ACLOCAL
# Don't warn in foreign mode
$AUTOMAKE -Wnone --add-missing --foreign
# Warn in gnu mode
$AUTOMAKE -Wnone --add-missing --gnu 2>stderr && exit 1
cat stderr
grep CFLAGS stderr
grep LDFLAGS stderr
# No reason to warn about CXXFLAGS since it's not used.
grep CXXFLAGS stderr && exit 1
# Don't warn if -Wno-gnu.
$AUTOMAKE -Wnone --gnu -Wno-gnu