[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/4] New automake command line option `--silent-rules'.
From: |
Ralf Wildenhues |
Subject: |
Re: [PATCH 4/4] New automake command line option `--silent-rules'. |
Date: |
Wed, 11 Mar 2009 21:06:07 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
* Ralf Wildenhues wrote on Sun, Mar 08, 2009 at 10:46:40AM CET:
> The current patch still has a couple of warts in that --silent-rules
> should turn off portability-recursive warnings independently of the
> command line argument order. This is another reason I don't like this
> addition much: it needs more special-casing and complex semantics in
> order to work seamlessly for users.
Second bug fix of this patch. Pushed to the branch.
The ugliness of the implementation has been mostly fixed now. So it's
more or less a matter of:
Do we want to allow a command line knob (--silent-rules) to turn
off `silent' mode, or do we force developers to either touch the
AUTOMAKE_OPTIONS variable in Makefile.am or the AM_INIT_AUTOMAKE
macro call in configure.ac?
List feedback has been mixed so far; there are good arguments on both
sides.
The --$flavor (cygwin|foreign|gnu|gnits) and --ignore-deps precedents
tend to make me say yes on this matter, leaning ever so slightly over
the edge.
Thanks,
Ralf
`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.
diff --git a/automake.in b/automake.in
index fac2313..9ee9dfd 100755
--- a/automake.in
+++ b/automake.in
@@ -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] =~ /^-./)
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index 3c152df..10fd00f 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -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",
diff --git a/tests/silent6.test b/tests/silent6.test
index 2bc2f8f..103cd34 100755
--- a/tests/silent6.test
+++ b/tests/silent6.test
@@ -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
+
:
- Re: [PATCH 4/4] New automake command line option `--silent-rules'., (continued)
- Re: [PATCH 4/4] New automake command line option `--silent-rules'., Raja R Harinath, 2009/03/09
- Re: [PATCH 4/4] New automake command line option `--silent-rules'., Ralf Wildenhues, 2009/03/09
- Re: [PATCH 4/4] New automake command line option `--silent-rules'., Ralf Corsepius, 2009/03/10
- Re: [PATCH 4/4] New automake command line option `--silent-rules'., Jan Engelhardt, 2009/03/10
- Re: [PATCH 4/4] New automake command line option `--silent-rules'., Ralf Wildenhues, 2009/03/10
- Re: [PATCH 4/4] New automake command line option `--silent-rules'., Ralf Wildenhues, 2009/03/11
Re: [PATCH 4/4] New automake command line option `--silent-rules'., Jim Meyering, 2009/03/10
Re: [PATCH 4/4] New automake command line option `--silent-rules'., Ralf Wildenhues, 2009/03/10
Re: [PATCH 4/4] New automake command line option `--silent-rules'.,
Ralf Wildenhues <=