From: Jim Meyering Date: Sat, 31 Oct 2009 16:47:58 +0000 (+0100) Subject: Don't let an envvar setting of "$fail" cause build failure. X-Git-Tag: ng-0.5a~459^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e58e5b453ad7b3cbda6c6f0968a63c001203c082;p=thirdparty%2Fautomake.git 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. * tests/subdir10.test: New test. * tests/Makefile.am: Update. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 5313f4ed1..178e6fed1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2009-10-31 Jim Meyering + Ralf Wildenhues + + 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. + * tests/subdir10.test: New test. + * tests/Makefile.am: Update. + 2009-10-17 Ralf Wildenhues Sync auxiliary files from upstream. diff --git a/Makefile.in b/Makefile.in index c52239021..177211151 100644 --- a/Makefile.in +++ b/Makefile.in @@ -377,7 +377,7 @@ uninstall-binSCRIPTS: # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -402,7 +402,7 @@ $(RECURSIVE_TARGETS): fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in index ea5da72ff..95c67bf4e 100644 --- a/lib/Automake/Makefile.in +++ b/lib/Automake/Makefile.in @@ -327,7 +327,7 @@ uninstall-nodist_perllibDATA: # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -352,7 +352,7 @@ $(RECURSIVE_TARGETS): fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff --git a/lib/Makefile.in b/lib/Makefile.in index 4eb619e9f..ac7f26b82 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -300,7 +300,7 @@ uninstall-dist_scriptDATA: # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -325,7 +325,7 @@ $(RECURSIVE_TARGETS): fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff --git a/lib/am/subdirs.am b/lib/am/subdirs.am index b86e674a4..9c01a8c6d 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]*);; \ diff --git a/tests/Makefile.am b/tests/Makefile.am index 98829c9ac..2c2e89a85 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -617,6 +617,7 @@ subdir6.test \ subdir7.test \ subdir8.test \ subdir9.test \ +subdir10.test \ subdirbuiltsources.test \ subcond.test \ subcond2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index d12b8504d..96bad893a 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -851,6 +851,7 @@ subdir6.test \ subdir7.test \ subdir8.test \ subdir9.test \ +subdir10.test \ subdirbuiltsources.test \ subcond.test \ subcond2.test \ diff --git a/tests/subdir10.test b/tests/subdir10.test new file mode 100755 index 000000000..c71216bf5 --- /dev/null +++ b/tests/subdir10.test @@ -0,0 +1,39 @@ +#! /bin/sh +# Copyright (C) 2009 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# SUDBIRS with $fail set in the environment. + +. ./defs || Exit 1 + +set -e + +mkdir sub + +cat >> configure.in <<'END' +AC_CONFIG_FILES([sub/Makefile]) +AC_OUTPUT +END + +echo SUBDIRS = sub >Makefile.am +: > sub/Makefile.am + +$ACLOCAL +$AUTOCONF +$AUTOMAKE +./configure +env fail=1 $MAKE all clean + +Exit 0