+2009-10-31 Jim Meyering <meyering@redhat.com>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ 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 <Ralf.Wildenhues@gmx.de>
Sync auxiliary files from upstream.
# (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]*);; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
# (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]*);; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
# (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]*);; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
$(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]*);; \
$(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]*);; \
subdir7.test \
subdir8.test \
subdir9.test \
+subdir10.test \
subdirbuiltsources.test \
subcond.test \
subcond2.test \
subdir7.test \
subdir8.test \
subdir9.test \
+subdir10.test \
subdirbuiltsources.test \
subcond.test \
subcond2.test \
--- /dev/null
+#! /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 <http://www.gnu.org/licenses/>.
+
+# 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