]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] warns: typos in '_DEPENDENCIES' variables are now reported
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 5 Jun 2012 14:16:21 +0000 (16:16 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 5 Jun 2012 21:23:36 +0000 (23:23 +0200)
Detection of those typos had been disabled in commit in commit
'v1.12-295-g9a5f837' of 2012-05-22, "[ng] warns: don't report possible
issues with '_DEPENDENCIES' variables", to avoid spurious errors.

* lib/am/check-typos.am (.am/vartypos/suffixes): Add '_DEPENDENCIES'.
(.am/vartypos/whitelisted-vars): Extend accordingly to avoid spurious
errors.
* t/vartypos.sh: Extend to also test bad usages of '_DEPENDENCIES'
variables.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
lib/am/check-typos.am
t/vartypos.sh

index 10d072b6df87e572261edc48db471db6651683fa..625896e2228208b89bd84d4a825e41f064325989 100644 (file)
 ## FIXME: internals somewhere.
 
 # Variables with these suffixes are candidates for typo checking.
-.am/vartypos/suffixes := _SOURCES _LIBADD _LDADD _LDFLAGS
+.am/vartypos/suffixes := _SOURCES _LIBADD _LDADD _LDFLAGS _DEPENDENCIES
+
 # But these variables are not, even if they match the patterns above.
-.am/vartypos/whitelisted-vars := AM_LDFLAGS BUILT_SOURCES
+.am/vartypos/whitelisted-vars := \
+  AM_LDFLAGS \
+  BUILT_SOURCES \
+  TAGS_DEPENDENCIES \
+  CONFIG_STATUS_DEPENDENCIES \
+  CONFIGURE_DEPENDENCIES
+# FIXME: Maybe we should only ignore the '*LOG_DEPENDENCIES' variables
+# FIXME: for which an associated test extension is actually defined?
+# FIXME: Or would that be overkill?
+.am/vartypos/whitelisted-vars += LOG_DEPENDENCIES %_LOG_DEPENDENCIES
 
 # Canonicalized names of programs and libraries (vanilla or libtool) that
 # have been declared.
index 71647aca8cdb3113fc3ba36568f2d4e055aad653..cf9b31e86ca996a6ee7edca5e0af0b57580c3052 100755 (executable)
@@ -38,6 +38,9 @@ EXTRA_foo_SOURCES =
 EXTRA_dist_foo_SOURCES =
 EXTRA_nodist_foo_SOURCES =
 
+foo_DEPENDENCIES =
+EXTRA_foo_DEPENDENCIES =
+
 foo_LDADD =
 foo_LDFLAGS =
 EXTRA_foo_LDADD =
@@ -50,6 +53,9 @@ EXTRA_libfoo_a_SOURCES =
 EXTRA_dist_libfoo_a_SOURCES =
 EXTRA_nodist_libfoo_a_SOURCES =
 
+libfoo_a_DEPENDENCIES =
+EXTRA_libfoo_a_DEPENDENCIES =
+
 libfoo_a_LIBADD =
 EXTRA_libfoo_a_LIBADD =
 libfoo_a_LDFLAGS =
@@ -62,6 +68,9 @@ EXTRA_libbar_la_SOURCES =
 EXTRA_dist_libbar_la_SOURCES =
 EXTRA_nodist_libbar_la_SOURCES =
 
+libbar_la_DEPENDENCIES =
+EXTRA_libbar_la_DEPENDENCIES =
+
 libbar_la_LIBADD =
 EXTRA_libbar_la_LIBADD =
 libbar_la_LDFLAGS =
@@ -82,7 +91,7 @@ cat stderr >&2
 
 $FGREP 'as canonical' stderr \
   | $EGREP -v " '(foo|libfoo_a|libbar_la)' " && Exit 1
-test 30 -eq $(grep -c 'variable.*is defined but' stderr)
+test 36 -eq $(grep -c 'variable.*is defined but' stderr)
 
 # If matching programs or libraries are defined, all errors should
 # disappear.