]> git.ipfire.org Git - thirdparty/automake.git/commit
silent-rules: fallback for makes without nested vars
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 25 Dec 2011 17:56:44 +0000 (09:56 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 25 Dec 2011 17:57:45 +0000 (09:57 -0800)
commit8493499b54da3694f820fa7eab5e58ef44448b66
tree28ab0b731d5cd57d03a5d2fae58ab1b6a3ef103a
parentbfc83bdec2e6e39a3275ae0c51b29a86603b49ad
silent-rules: fallback for makes without nested vars

This fixes two problems reported for Automake (Bug#9928, Bug#10237)
and is in response to a bug report for building coreutils on HP
NonStop OS (Bug#10234).  The problem is that HP NonStop 'make'
treats a line like "AM_V_CC = $(am__v_CC_$(V))" as one that
expands a macro with the funny name am__v_CC_$(V instead of the
desired name am__v_CC_1 or am__v_CC_0, and since the funny macro
is not defined the line is equivalent to "AM_V_CC = )"; this
inserts a stray ")" when $(AM_V_CC) is used, which eventually
causes 'make' to fail.

The basic idea is that instead of generating Makefile.in lines like
"AM_V_CC = $(am__v_CC_$(V))", we generate
"AM_V_CC = $(am__v_CC_@AM_V@)".  We then AC_SUBST $(V) for @AM_V@
in the usual case where `make' supports nested variables,
and substitute 1 (or 0) otherwise.  Similarly for usages like
$(am__v_CC_$(AM_DEFAULT_VERBOSITY)).

With this change, make implementations that doesn't grasp nested
variable expansions will still be able to run Makefiles generated
using the silent-rules option.  They won't allow the user to
override the make verbosity at runtime through redefinition of
$(V) (as in "make V=0"); but this is still an improvement over not
being able to work at all.

* NEWS: Document this.
* automake.in (define_verbose_var): When defining the variables,
use @AM_V@ rather than $(V), and use @AM_DEFAULT_V@ rather than
$(AM_DEFAULT_VERBOSITY).
* doc/automake.texi (Automake silent-rules Option): Explain new system.
* m4/silent.m4 (AM_SILENT_RULES): Check whether `make' supports
nested variables, and substitute AM_V and AM_DEFAULT_V accordingly.
* tests/silent-nested-vars.test: New test.
* tests/Makefile.am (TESTS): Add it.
ChangeLog
NEWS
automake.in
doc/automake.texi
m4/silent.m4
tests/Makefile.am
tests/silent-nested-vars.test [new file with mode: 0755]