]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] warns: don't report possible issues with '_DEPENDENCIES' variables
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 22 May 2012 14:21:28 +0000 (16:21 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 22 May 2012 20:46:55 +0000 (22:46 +0200)
This will allow us to move (in future changes) some more processing at
make runtime, without having automake complain spuriously (which couldn't
be avoided, as to avoid such complaints automake should have access to
context and information only available at make runtime -- which is clearly
impossible).

* NG-NEWS: Document that Automake-NG can be weaker than mainline Automake
in diagnostic and early error detection; and also explain why it is so.
* automake.in (check_typos): Don't check for possible typos in the
'_DEPENDENCIES'.
Consequently, don't bother calling 'set_seen' ...
(handle_per_suffix_test): ... on the 'LOG_DEPENDENCIES' variables ...
(scan_aclocal_m4): ... nor on the 'CONFIG_STATUS_DEPENDENCIES' and
'CONFIGURE_DEPENDENCIES' variables ...
(handle_tags): ... nor on the 'TAGS_DEPENDENCIES' variable ...
(handle_ltlibraries): ... nor on the 'libfoo_la_DEPENDENCIES' nor
the 'EXTRA_libfoo_la_DEPENDENCIES' variables ...
(handle_libraries): ... nor on the 'libfoo_a_DEPENDENCIES' nor the
'EXTRA_libfoo_a_DEPENDENCIES' variables ...
(handle_programs): ... nor on the 'program_DEPENDENCIES' nor the
'EXTRA_program_DEPENDENCIES' variables.
* t/vartypos.sh, t/vartypo2.sh: Relax accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
NG-NEWS
automake.in
t/vartypo2.sh
t/vartypos.sh

diff --git a/NG-NEWS b/NG-NEWS
index 74b0721ac887b9a0a00dfa36983850ffb8cc2af0..c67a580330534cec4cb6f4de7cdefadb0c3e70ab 100644 (file)
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -59,6 +59,12 @@ Warnings and diagnostic
 * The 'portability-recursive' warning category is obsolete, and has been
   removed.
 
+* Automake-NG is less smart than mainline Automake in detecting some kind
+  of possible typos or suspicious usages at automake runtime.  This is due
+  to the fact that more processing and logic takes place in the generated
+  Makefiles rather than in the automake script, so that the latter has
+  access to less context and information.
+
 Serial testsuite harness (obsolescent)
 ======================================
 
index 08815de688161ae2fd2b91bd1a3b1c9922176045..ec57787696a3ee559baee0b3b9aeec78d5dc402a 100644 (file)
@@ -2429,8 +2429,6 @@ sub handle_programs
       reject_var ($xname . '_LIBADD',
                  "use '${xname}_LDADD', not '${xname}_LIBADD'");
 
-      set_seen ($xname . '_DEPENDENCIES');
-      set_seen ('EXTRA_' . $xname . '_DEPENDENCIES');
       set_seen ($xname . '_LDFLAGS');
 
       # Determine program to use for link.
@@ -2541,10 +2539,6 @@ sub handle_libraries
       reject_var ($xlib . '_LDADD',
                  "use '${xlib}_LIBADD', not '${xlib}_LDADD'");
 
-      # Make sure we at look at this.
-      set_seen ($xlib . '_DEPENDENCIES');
-      set_seen ('EXTRA_' . $xlib . '_DEPENDENCIES');
-
       &handle_source_transform ($xlib, $onelib, $obj, $where,
                                NONLIBTOOL => 1, LIBTOOL => 0);
 
@@ -2728,10 +2722,8 @@ sub handle_ltlibraries
       $where->push_context ("while processing Libtool library '$onelib'");
       $where->set (INTERNAL->get);
 
-      # Make sure we look at these.
+      # Make sure we look at this.
       set_seen ($xlib . '_LDFLAGS');
-      set_seen ($xlib . '_DEPENDENCIES');
-      set_seen ('EXTRA_' . $xlib . '_DEPENDENCIES');
 
       # Generate support for conditional object inclusion in
       # libraries.
@@ -2831,7 +2823,7 @@ sub check_typos ()
   # It is ok if the user sets this particular variable.
   set_seen 'AM_LDFLAGS';
 
-  foreach my $primary ('SOURCES', 'LIBADD', 'LDADD', 'LDFLAGS', 'DEPENDENCIES')
+  foreach my $primary ('SOURCES', 'LIBADD', 'LDADD', 'LDFLAGS')
     {
       foreach my $var (variables $primary)
        {
@@ -3581,8 +3573,6 @@ sub handle_tags
                                         TAGSDIRS  => "@tag_deps",
                                         CTAGSDIRS => "@ctag_deps",
                                         CSCOPEDIRS => "@cscope_deps");
-
-       set_seen 'TAGS_DEPENDENCIES';
     }
     elsif (reject_var ('TAGS_DEPENDENCIES',
                       "it doesn't make sense to define 'TAGS_DEPENDENCIES'"
@@ -3831,9 +3821,6 @@ sub scan_aclocal_m4 ()
 {
   my $regen_aclocal = 0;
 
-  set_seen 'CONFIG_STATUS_DEPENDENCIES';
-  set_seen 'CONFIGURE_DEPENDENCIES';
-
   if (-f 'aclocal.m4')
     {
       &define_variable ("ACLOCAL_M4", '$(top_srcdir)/aclocal.m4', INTERNAL);
@@ -4588,10 +4575,6 @@ sub handle_per_suffix_test($)
                        '$(SHELL) $(am__config_aux_dir)/test-driver',
                        INTERNAL);
     }
-  # Required to avoid spurious errors like:
-  # ``variable 'LOG_DEPENDENCIES' is defined but no program or
-  #   library has 'LOG' as canonical name (possible typo)''
-  set_seen ("${pfx}LOG_DEPENDENCIES");
 }
 
 # is_valid_test_extension ($EXT)
index 9b52df683fb7c3005d0fed048cb430a259f79ce2..9c1b6d77efaf63953cef1a6fbc8bcd945b5671de 100755 (executable)
@@ -31,8 +31,6 @@ libfoo_la_SOURCES = unused
 nodist_libfoo_la_SOURCES = unused
 EXTRA_libfoo_la_SOURCES = unused
 libfoo_la_LIBADD = unused
-libfoo_la_DEPENDENCIES = unused
-EXTRA_libfoo_la_DEPENDENCIES = unused
 END
 
 libtoolize
@@ -48,14 +46,9 @@ AUTOMAKE_fails --add-missing
 # Makefile.am:2: library has `libfoo_la' as canonical name (possible typo)
 # Makefile.am:4: warning: variable `libfoo_la_LIBADD' is defined but no program or
 # Makefile.am:4: library has `libfoo_la' as canonical name (possible typo)
-# Makefile.am:6: warning: variable `EXTRA_libfoo_la_DEPENDENCIES' is defined but no program or
-# Makefile.am:6: library has `libfoo_la' as canonical name (possible typo)
-# Makefile.am:5: warning: variable `libfoo_la_DEPENDENCIES' is defined but no program or
-# Makefile.am:5: library has `libfoo_la' as canonical name (possible typo)
-
 
 grep 'as canonical' stderr | grep -v ' .libfoo_la. ' && Exit 1
-test `grep 'variable.*is defined but' stderr | wc -l` = 6
+test `grep 'variable.*is defined but' stderr | wc -l` = 4
 
 # If we add a global -Wnone, all warnings should disappear.
 $AUTOMAKE -Wnone
index eb924cc06470586eefde18f24e788f9125bf81f8..d176d047dc9e83092194c3af3d7be778284c1e63 100755 (executable)
@@ -29,15 +29,11 @@ nodist_foo_SOURCES = unused
 EXTRA_foo_SOURCES = unused
 foo_LDADD = unused
 foo_LDFLAGS = unused
-foo_DEPENDENCIES = unused
-EXTRA_foo_DEPENDENCIES = unused
 
 libfoo_a_SOURCES = unused
 nodist_libfoo_a_SOURCES = unused
 EXTRA_libfoo_a_SOURCES = unused
 libfoo_a_LIBADD = unused
-libfoo_a_DEPENDENCIES = unused
-EXTRA_libfoo_a_DEPENDENCIES = unused
 END
 
 $ACLOCAL
@@ -62,18 +58,10 @@ AUTOMAKE_fails -Wno-extra-portability
 # Makefile.am:4: library has 'foo' as canonical name (possible typo)
 # Makefile.am:5: warning: variable 'foo_LDFLAGS' is defined but no program or
 # Makefile.am:5: library has 'foo' as canonical name (possible typo)
-# Makefile.am:14: warning: variable 'EXTRA_libfoo_a_DEPENDENCIES' is defined but no program or
-# Makefile.am:14: library has 'libfoo_a' as canonical name (possible typo)
-# Makefile.am:7: warning: variable 'EXTRA_foo_DEPENDENCIES' is defined but no program or
-# Makefile.am:7: library has 'foo' as canonical name (possible typo)
-# Makefile.am:6: warning: variable 'foo_DEPENDENCIES' is defined but no program or
-# Makefile.am:6: library has 'foo' as canonical name (possible typo)
-# Makefile.am:13: warning: variable 'libfoo_a_DEPENDENCIES' is defined but no program or
-# Makefile.am:13: library has 'libfoo_a' as canonical name (possible typo)
 
 grep 'as canonical' stderr | grep -v ' .foo. ' | grep -v ' .libfoo_a. ' \
   && Exit 1
-test `grep 'variable.*is defined but' stderr | wc -l` = 13
+test `grep 'variable.*is defined but' stderr | wc -l` = 9
 
 # If we add a global -Wnone, all warnings should disappear.
 $AUTOMAKE -Wnone