]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
`silent' mode unconditionally overrides portability-recursive.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 11 Mar 2009 19:53:24 +0000 (20:53 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 11 Mar 2009 19:55:45 +0000 (20:55 +0100)
* automake.in (parse_arguments): Don't handle a global `silent'
option here; instead, ...
(handle_options): ... handle the "normal" `silent' option here.
Override `portability-recursive' here, at the last point we deal
with options, instead ...
* lib/Automake/Options.pm (_process_option_list): ... of here.
* tests/silent6.test: Replace unportable make snippet, remove
FIXME note, add more test cases of options passed in the various
locations.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
automake.in
lib/Automake/Options.pm
tests/silent6.test

index d614030188c274eca753f9644a1308e415a89c6f..bed1374c0f357608e74d33d4dfa84e1ded4195ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2009-03-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       `silent' mode unconditionally overrides portability-recursive.
+       * automake.in (parse_arguments): Don't handle a global `silent'
+       option here; instead, ...
+       (handle_options): ... handle the "normal" `silent' option here.
+       Override `portability-recursive' here, at the last point we deal
+       with options, instead ...
+       * lib/Automake/Options.pm (_process_option_list): ... of here.
+       * tests/silent6.test: Replace unportable make snippet, remove
+       FIXME note, add more test cases of options passed in the various
+       locations.
+
        Drop extra line from compile rules when `silent' is not used.
        * lib/am/depend2.am [!%FASTDEP%]: Only use the `%VERBOSE%
        @AM_BACKSLASH@' extra line if ?VERBOSE?.
index fac2313a3d8f9bf1bb81b3219f29dd2f140bd80c..9ee9dfd86c5e77af61dc1786240ea409fd5f6f4e 100755 (executable)
@@ -1214,6 +1214,10 @@ sub handle_options
        }
     }
 
+  # Override portability-recursive warning.
+  switch_warning ('no-portability-recursive')
+    if option 'silent';
+
   if ($strictness == GNITS)
     {
       set_option ('readme-alpha', INTERNAL);
@@ -8189,10 +8193,6 @@ sub parse_arguments ()
       $output_directory = '.';
     }
 
-  # Override portability-recursive warning.
-  process_global_option_list ($cli_where, 'silent')
-    if global_option 'silent';
-
   return unless @ARGV;
 
   if ($ARGV[0] =~ /^-./)
index 3c152dfd6f99e3635bc91c3e3b6116e88ba5ae68..10fd00f67d65e4aee32c300e875f11eca6fe133e 100644 (file)
@@ -267,6 +267,7 @@ sub _process_option_list (\%$@)
             || $_ eq 'no-exeext' || $_ eq 'no-define'
             || $_ eq 'std-options'
             || $_ eq 'color-tests'
+            || $_ eq 'silent'
             || $_ eq 'cygnus' || $_ eq 'no-dependencies')
        {
          # Explicitly recognize these.
@@ -310,10 +311,6 @@ sub _process_option_list (\%$@)
                if switch_warning $cat;
            }
        }
-      elsif ($_ eq 'silent')
-        {
-         switch_warning ('no-portability-recursive');
-       }
       else
        {
          error ($where, "option `$_' not recognized",
index 2bc2f8fb804445b1e5dbe02dfbad63943fcee108..103cd342369779d459fee58d469332010a706f31 100755 (executable)
@@ -30,7 +30,7 @@ EOF
 
 cat > Makefile.am <<'EOF'
 if SILENT
-my_verbose = $(my_verbose_$V)
+my_verbose = $(my_verbose_$(V))
 my_verbose_ = $(my_verbose_0)
 my_verbose_0 = @echo GEN $@;
 endif
@@ -46,8 +46,7 @@ EOF
 : >foo.in
 
 $ACLOCAL
-# FIXME: it should not be necessary to disable Wportability here.
-$AUTOMAKE --add-missing -Wno-portability --silent-rules
+$AUTOMAKE --add-missing --silent-rules
 $AUTOCONF
 
 ./configure silent_rules=yes
@@ -70,4 +69,30 @@ cat stdout
 grep 'GEN foo' stdout && Exit 1
 grep 'cp ' stdout
 
+$MAKE distclean
+
+# Things should also work with -Wall in AM_INIT_AUTOMAKE.
+cat > configure.in <<'END'
+AC_INIT([silent6], [1.0])
+AM_INIT_AUTOMAKE([-Wall])
+AM_CONDITIONAL([SILENT], [:])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+$ACLOCAL
+AUTOMAKE_fails --force
+$AUTOMAKE --force -Wno-error
+grep ' --silent-rules' Makefile.in && Exit 1
+$AUTOMAKE --force --silent-rules
+grep ' --silent-rules' Makefile.in
+$AUTOMAKE --force -Wno-all -Wportability --silent-rules
+grep ' --silent-rules' Makefile.in
+
+echo 'AUTOMAKE_OPTIONS = silent' >> Makefile.am
+$AUTOMAKE --force
+grep 'AM_V_GEN' Makefile.in
+$AUTOMAKE --force -Wno-all -Wportability
+grep 'AM_V_GEN' Makefile.in
+
 :