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?.
}
}
+ # Override portability-recursive warning.
+ switch_warning ('no-portability-recursive')
+ if option 'silent';
+
if ($strictness == GNITS)
{
set_option ('readme-alpha', INTERNAL);
$output_directory = '.';
}
- # Override portability-recursive warning.
- process_global_option_list ($cli_where, 'silent')
- if global_option 'silent';
-
return unless @ARGV;
if ($ARGV[0] =~ /^-./)
|| $_ eq 'no-exeext' || $_ eq 'no-define'
|| $_ eq 'std-options'
|| $_ eq 'color-tests'
+ || $_ eq 'silent'
|| $_ eq 'cygnus' || $_ eq 'no-dependencies')
{
# Explicitly recognize these.
if switch_warning $cat;
}
}
- elsif ($_ eq 'silent')
- {
- switch_warning ('no-portability-recursive');
- }
else
{
error ($where, "option `$_' not recognized",
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
: >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
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
+
: