Hi Ralf, While fixing similar problems in coreutils' test suite, I found that with an automake-generated Makefile, "make" always fails when I set e.g, fail=1 in the environment.
This fix works for me in that now, with regenerated Makefile.in files, coreutils' "make check fail=1" now passes. >From ffcd00af02f97d8990ee0f45ab82706803f10578 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Fri, 30 Oct 2009 12:02:22 +0100 Subject: [PATCH] Don't let an envvar setting of "$fail" cause build failure. Without this change, in a project using an automake-generated Makefile, "make fail=anything" would fail inappropriately, due to the `test -z "$$fail"' at the end of this emitted rule: * lib/am/subdirs.am ($(RECURSIVE_TARGETS)): Initialize "fail=" to keep an envvar setting of that variable from causing unwarranted failure. ($(RECURSIVE_CLEAN_TARGETS)): Likewise. --- ChangeLog | 10 ++++++++++ lib/am/subdirs.am | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2fe0566..90af382 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-10-30 Jim Meyering <meyer...@redhat.com> + + Don't let an envvar setting of "$fail" cause build failure. + Without this change, in a project using an automake-generated + Makefile, "make fail=anything" would fail inappropriately, + due to the `test -z "$$fail"' at the end of this emitted rule: + * lib/am/subdirs.am ($(RECURSIVE_TARGETS)): Initialize "fail=" to keep + an envvar setting of that variable from causing unwarranted failure. + ($(RECURSIVE_CLEAN_TARGETS)): Likewise. + 2009-10-18 Ralf Wildenhues <ralf.wildenh...@gmx.de> Simplify Variable::_check_ambiguous_condition. diff --git a/lib/am/subdirs.am b/lib/am/subdirs.am index b86e674..9c01a8c 100644 --- a/lib/am/subdirs.am +++ b/lib/am/subdirs.am @@ -36,7 +36,7 @@ AM_RECURSIVE_TARGETS += $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_TARGETS): ## Using $failcom allows "-k" to keep its natural meaning when running a ## recursive rule. - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -75,7 +75,7 @@ maintainer-clean: maintainer-clean-recursive $(RECURSIVE_CLEAN_TARGETS): ## Using $failcom allows "-k" to keep its natural meaning when running a ## recursive rule. - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ -- 1.6.5.2.375.g164f1