[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [PATCH] memoize: expose a serious bug (for GNU make < 3.83
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [PATCH] memoize: expose a serious bug (for GNU make < 3.83) |
Date: |
Tue, 15 May 2012 11:21:11 +0200 |
This is a follow-up to commit v1.12-217-gd55204f of 2012-05-12,
"[ng] vars: implement memoization of make variables (new 'am__memoize'
func)".
So, apparently, all our workarounds aimed at avoiding the subtle GNU
make bug affecting variable memoization:
<http://lists.gnu.org/archive/html/bug-make/2012-05/msg00013.html>
<https://savannah.gnu.org/patch/?7534>
have not been enough :-(
When trying to use 'am__memoize' in a non-trivial setup (to optimize
the new form of the parallel-tests harness implemented by the series
http://lists.gnu.org/archive/html/automake-ng/2012-05/msg00015.html),
we stumbled upon that bug again. At this point, it's quite clear that
there is no safe way to safely avoid it, so we'll have to find a way
to enable memoization (that is just an optimization) only with GNU
make >= 3.83 (once that is out).
Here, we just enhance our testsuite to expose the (re)discovered
issue.
* t/memoize.tap: Enhance. The new check fails with GNU make <= 3.82,
and passes with the development version of GNU make (which should
become GNU make 3.83 eventually).
Signed-off-by: Stefano Lattarini <address@hidden>
---
t/memoize.tap | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/t/memoize.tap b/t/memoize.tap
index 516d335..8bd56f7 100755
--- a/t/memoize.tap
+++ b/t/memoize.tap
@@ -19,7 +19,7 @@
am_create_testdir=empty
. ./defs || Exit 1
-plan_ 12
+plan_ 13
ocwd=`pwd` || fatal_ "couldn't get current working directory"
@@ -223,6 +223,25 @@ END
#---------------------------------------------------------------------------
+# This usage has been known to cause problems with GNU make <= 3.82,
+# tickling this bug:
+# <http://lists.gnu.org/archive/html/bug-make/2012-05/msg00013.html>
+# <https://savannah.gnu.org/patch/?7534>
+
+T "known GNU make issue (https://savannah.gnu.org/patch/?7534)" <<'END'
+
+setup := $(shell mkdir -p t/pm && : > t/pm/Cond2.pl)
+
+TESTS = $(wildcard t/pm/Cond2.pl)
+memo/am__test_bases = $(TESTS)
+$(call am__memoize,am__test_bases)
+
+test:
+ test '$(am__test_bases)' = 't/pm/Cond2.pl'
+END
+
+#---------------------------------------------------------------------------
+
# Try memoization with variables having a very long content. Our first
# (unpublished) memoization implementation didn't work in that case -- it
# triggered errors like "*** unterminated variable reference. Stop" when
--
1.7.9.5
- Re: [Automake-NG] [PATCH 00/11] Several changes to parallel-tests support, (continued)
- Re: [Automake-NG] [PATCH 00/11] Several changes to parallel-tests support, Akim Demaille, 2012/05/11
- Re: [Automake-NG] [PATCH 00/11] Several changes to parallel-tests support, Akim Demaille, 2012/05/11
- Re: [Automake-NG] [PATCH 00/11] Several changes to parallel-tests support, Stefano Lattarini, 2012/05/11
- [Automake-NG] [PATCH] vars: implement make variable memoization (new function 'am__memoize'), Stefano Lattarini, 2012/05/13
- Re: [Automake-NG] [PATCH] vars: implement make variable memoization (new function 'am__memoize'), Dave Hart, 2012/05/13
- Re: [Automake-NG] [PATCH] vars: implement make variable memoization (new function 'am__memoize'), Stefano Lattarini, 2012/05/13
- Re: [Automake-NG] [PATCH] vars: implement make variable memoization (new function 'am__memoize'), Akim Demaille, 2012/05/14
- Re: [Automake-NG] [PATCH] vars: implement make variable memoization (new function 'am__memoize'), Stefano Lattarini, 2012/05/15
- [Automake-NG] [PATCH] memoize: expose a serious bug (for GNU make < 3.83),
Stefano Lattarini <=
- Re: [Automake-NG] [PATCH] memoize: expose a serious bug (for GNU make < 3.83), Akim Demaille, 2012/05/15
- [Automake-NG] [PATCH 0/3] Fix variable memoization, Stefano Lattarini, 2012/05/15
- [Automake-NG] [PATCH 2/3] [ng] coverage: test memoize on variable with long name and long content, Stefano Lattarini, 2012/05/15
- [Automake-NG] [PATCH 1/3] [ng] memoize: expose a serious bug (affecting GNU make < 3.83), Stefano Lattarini, 2012/05/15
- [Automake-NG] [PATCH 3/3] [ng] memoize: correctly work around a bug of GNU make < 3.83, Stefano Lattarini, 2012/05/15
- Re: [Automake-NG] [PATCH 3/3] [ng] memoize: correctly work around a bug of GNU make < 3.83, Akim Demaille, 2012/05/15
- Re: [Automake-NG] [PATCH 3/3] [ng] memoize: correctly work around a bug of GNU make < 3.83, Stefano Lattarini, 2012/05/15
- Re: [Automake-NG] [PATCH 3/3] [ng] memoize: correctly work around a bug of GNU make < 3.83, Akim Demaille, 2012/05/15
- Re: [Automake-NG] [PATCH 3/3] [ng] memoize: correctly work around a bug of GNU make < 3.83, Stefano Lattarini, 2012/05/15
- Re: [Automake-NG] [PATCH 3/3] [ng] memoize: correctly work around a bug of GNU make < 3.83, Stefano Lattarini, 2012/05/16