From: Stefano Lattarini Date: Fri, 15 Jun 2012 13:37:19 +0000 (+0200) Subject: Merge branch 'master' into ng/master X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=529d8ecb28e9c6fd7fdcde76e1ed373b15a67135;p=thirdparty%2Fautomake.git Merge branch 'master' into ng/master * master: automake: stop supporting "%KEY?iftrue:iffalse%" transforms am: stop using "%KEY:iffalse?iftrue%" transforms tests: minor reorganization of few tests fixup: adjust t/list-of-tests.mk for renamed/added tests subdirs: enhance coverage, tweak and rename few tests sync: update files from upstream with "make fetch" py-compile: consistently quote 'like this', not `like this'. docs: recursive make considered harmful docs: clean rules are not run in reverse order of build rules anymore silent: new $(AM_V_P) variable, tell if we're running in silent mode refactor: silent rules handling (a little) refactor: &define_verbose_var: accept a third optional argument + Extra non-trivial edits: * t/dir-named-obj-is-bad.sh, t/sourcefile-in-subdir.sh: Delete, it's how the old (and in Automake-NG obsolete and removed) tests 't/subdir3.sh' and 't/subdir7.sh' have been respectively renamed in mainline Automake. * t/silent6.sh: Don't disable the 'portability-recursive' warnings, they are not anymore used nor supported by Automake-NG. * automake.in: Adjust calls to subroutines '&Automake::Variable::define' and '&define_variable' to the different Automake-NG APIs and signature. Signed-off-by: Stefano Lattarini --- 529d8ecb28e9c6fd7fdcde76e1ed373b15a67135 diff --cc automake.in index c5912aa05,3f869b234..d01abd196 --- a/automake.in +++ b/automake.in @@@ -1137,15 -1150,20 +1140,17 @@@ sub define_verbose_var ($$;$ my $var = verbose_var ($name); my $pvar = verbose_private_var ($name); my $silent_var = $pvar . '_0'; + my $verbose_var = $pvar . '_1'; - # For typical 'make's, 'configure' replaces AM_V (inside @@) with $(V) - # and AM_DEFAULT_V (inside @@) with $(AM_DEFAULT_VERBOSITY). - # For strict POSIX 2008 'make's, it replaces them with 0 or 1 instead. - # See AM_SILENT_RULES in m4/silent.m4. - define_variable ($var, '$(' . $pvar . '_@'.'AM_V'.'@)', INTERNAL); - define_variable ($pvar . '_', '$(' . $pvar . '_@'.'AM_DEFAULT_V'.'@)', - INTERNAL); + define_variable ($var, INTERNAL, + '$(' . $pvar . '_$(V))'); + define_variable ($pvar . '_', INTERNAL, + '$(' . $pvar . '_$(AM_DEFAULT_VERBOSITY))'); - if (! vardef ($silent_var, TRUE)) - { - Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE, - $val, '', INTERNAL); - } + Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE, - $silent_val, '', INTERNAL, VAR_ASIS) ++ $silent_val, '', INTERNAL) + if (! vardef ($silent_var, TRUE)); + Automake::Variable::define ($verbose_var, VAR_AUTOMAKE, '', TRUE, - $verbose_val, '', INTERNAL, VAR_ASIS) ++ $verbose_val, '', INTERNAL) + if (! vardef ($verbose_var, TRUE)); } # Above should not be needed in the general automake code. diff --cc doc/automake-ng.texi index 558ad0a52,0ed2bfec0..d01321043 --- a/doc/automake-ng.texi +++ b/doc/automake-ng.texi @@@ -10743,9 -10811,26 +10752,10 @@@ at @command{configure} time and at @com @vindex @code{AM_V_GEN} @vindex @code{AM_V_at} @vindex @code{AM_DEFAULT_VERBOSITY} - To extend the silent mode to your own rules, you have two choices: -@vindex @code{AM_V} -@vindex @code{AM_DEFAULT_V} + To extend the silent mode to your own rules, you have few choices: @itemize @bullet + @item You can use the predefined variable @code{AM_V_GEN} as a prefix to commands that should output a status line in silent mode, and diff --cc t/silent6.sh index a493e3ef0,c7e7819f1..0fc366509 --- a/t/silent6.sh +++ b/t/silent6.sh @@@ -22,12 -23,30 +23,29 @@@ AC_CONFIG_FILES([sub/Makefile] AC_OUTPUT EOF - cat > Makefile.am <<'EOF' + # We delegate all the work to the subdir makefile. This is done + # to ensure any command-line setting of $(V) gets correctly passed + # down to recursive make invocations. + echo SUBDIRS = sub > Makefile.am + + mkdir sub + cat > sub/Makefile.am <<'EOF' -AUTOMAKE_OPTIONS = -Wno-portability-recursive my_verbose = $(my_verbose_$(V)) my_verbose_ = $(my_verbose_$(AM_DEFAULT_VERBOSITY)) - my_verbose_0 = @echo GEN $@; + my_verbose_0 = @echo " XGEN $@"; + + all-local: foo gen-headers - all-local: foo + list = 0 1 2 + .PHONY: gen-headers + gen-headers: + @headers=`for i in $(list); do echo sub/$$i.h; done`; \ + if $(AM_V_P); then set -x; else \ + echo " GEN [headers]"; \ + fi; \ + rm -f $$headers || exit 1; \ + ## Only fake header generation. + : generate-header --flags $$headers foo: foo.in $(my_verbose)cp $(srcdir)/foo.in $@