From: Stefano Lattarini Date: Tue, 5 Jun 2012 14:16:21 +0000 (+0200) Subject: [ng] warns: typos in '_DEPENDENCIES' variables are now reported X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7206037c1d573c29a1c2a3e909c531b7d90cabc;p=thirdparty%2Fautomake.git [ng] warns: typos in '_DEPENDENCIES' variables are now reported 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 --- diff --git a/lib/am/check-typos.am b/lib/am/check-typos.am index 10d072b6d..625896e22 100644 --- a/lib/am/check-typos.am +++ b/lib/am/check-typos.am @@ -26,9 +26,19 @@ ## 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. diff --git a/t/vartypos.sh b/t/vartypos.sh index 71647aca8..cf9b31e86 100755 --- a/t/vartypos.sh +++ b/t/vartypos.sh @@ -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.