[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14316: [PATCH 6/7] subdirs: don't return false positives for the '-k
From: |
Stefano Lattarini |
Subject: |
bug#14316: [PATCH 6/7] subdirs: don't return false positives for the '-k' option's presence |
Date: |
Mon, 29 Apr 2013 23:00:34 +0200 |
This change fixes automake bug#12554.
The old implementation of the code descending into $(SUBDIRS)
entries used the following snippet to decide whether make is running
with the '-k' a.k.a. '--keep-going' option, and thus whether a failure
in a subdirectory should prevent the descent in the following ones:
fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done
It's clear that the second pattern in the 'case' construct could possibly
match false positives, for examples in these two cases:
make check TESTS="x.test k.test"
make -I /usr/local/kool-fragments
which are somewhat unusual, but not invalid. So we need a more resilient
implementation, as we did for the detection of the '-n' flag.
This implementation is now provided by the new private macro
'$(am__make_keepgoing)' (introduced in recent commits); so we can
just us that to fix the bug.
* lib/am/subdirs.am ($(am__recursive_targets)): Use '$(am__make_keepgoing)'
instead of ad-hoc and more brittle checks.
* t/list-of-tests.mk (XFAIL_TESTS): Remove the now-passing test case
't/subdir-keep-going-pr12554.sh'.
Reported-by: Michael Daniels <address@hidden>
Signed-off-by: Stefano Lattarini <address@hidden>
---
lib/am/subdirs.am | 13 ++++++-------
t/list-of-tests.mk | 1 -
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/lib/am/subdirs.am b/lib/am/subdirs.am
index c4c3694..999aa78 100644
--- a/lib/am/subdirs.am
+++ b/lib/am/subdirs.am
@@ -39,13 +39,12 @@ AM_RECURSIVE_TARGETS += $(am__recursive_targets:-recursive=)
$(am__recursive_targets):
## Using $failcom allows "-k" to keep its natural meaning when running a
## recursive rule.
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
## For distclean and maintainer-clean we make sure to use the full
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 51a3272..bb9b7a6 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -41,7 +41,6 @@ t/remake-timing-bug-pr8365.sh \
t/lex-subobj-nodep.sh \
t/remake-am-pr10111.sh \
t/remake-m4-pr10111.sh \
-t/subdir-keep-going-pr12554.sh \
$(perl_fake_XFAIL_TESTS)
perl_TESTS = \
--
1.8.2.1.610.g562af5b
- bug#12554: Checking MAKEFLAGS with RECURSIVE_TARGETS, Stefano Lattarini, 2013/04/29
- bug#14309: [PATCH 0/7][PATCH 0/7] Fix automake bug#12554., Stefano Lattarini, 2013/04/29
- bug#14310: [PATCH 3/7] tests: remove dead code from t/make-dryrun.tap, Stefano Lattarini, 2013/04/29
- bug#14314: [PATCH 7/7] tests: avoid a spurious error with Solaris make, Stefano Lattarini, 2013/04/29
- bug#14312: [PATCH 1/7] tests: expose bug#12554 (false positives for presence of '-k' make option), Stefano Lattarini, 2013/04/29
- bug#14313: [PATCH 4/7] header-vars: simplify how make flags are determined, Stefano Lattarini, 2013/04/29
- bug#14316: [PATCH 6/7] subdirs: don't return false positives for the '-k' option's presence,
Stefano Lattarini <=
- bug#12554: [PATCH 2/7] header-vars: new variable $(am__running_with_option), Stefano Lattarini, 2013/04/29
- bug#14315: [PATCH 5/7] header-vars: recognize more make flags ('-k' in particular), Stefano Lattarini, 2013/04/29