GNU bug report logs -
#79266
Replacement (substitution) variable references not supported in TESTS
Previous Next
To reply to this bug, email your comments to 79266 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-automake <at> gnu.org
:
bug#79266
; Package
automake
.
(Mon, 18 Aug 2025 21:25:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Richard Hansen <rhansen <at> rhansen.org>
:
New bug report received and forwarded. Copy sent to
bug-automake <at> gnu.org
.
(Mon, 18 Aug 2025 21:25:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
POSIX Issue 8 added support for pattern substitution variable references
like the following:
$(foo:%=pfx_%_sfx)
When such a variable reference is added to TESTS, directly or indirectly
(with delayed expansion), the substitution part is discarded, becoming
$(foo). For example:
TESTS = $(foo:%=pfx_%_sfx)
effectively becomes:
TESTS = $(foo)
The same is true for non-pattern suffix replacement references, which
have been in POSIX since at least Issue 5 (1997). For example:
TESTS = $(foo:.ext1=.ext2)
effectively becomes:
TESTS = $(foo)
Tested with:
* git master branch
* 1.16.5 packaged in Ubuntu
Not tested:
* whether other variables are also affected
* whether this is a recent breakage or a longstanding bug
I did not see any mention of this issue in the manual or existing bug
reports. Please let me know if I overlooked something.
I will send a patch adding test cases as soon as I know what this bug's
number will be. I am willing to propose patches to fix this; a pointer
to where in the code this bug lives would be appreciated.
Thanks,
Richard
Information forwarded
to
bug-automake <at> gnu.org
:
bug#79266
; Package
automake
.
(Mon, 18 Aug 2025 21:34:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 79266 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Attached are tests for this bug.
[0001-tests-add-XFAIL-tests-for-substitution-replacement-v.patch (text/x-patch, attachment)]
Information forwarded
to
bug-automake <at> gnu.org
:
bug#79266
; Package
automake
.
(Mon, 18 Aug 2025 21:39:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 79266 <at> debbugs.gnu.org (full text, mbox):
Hi Richard,
I did not see any mention of this issue in the manual or existing bug
reports. Please let me know if I overlooked something.
Pretty sure you haven't overlooked anything. Don't recall seeing
any mention of this before.
I will send a patch adding test cases as soon as I know what this
bug's number will be.
79266, evidently.
I am willing to propose patches to fix this;
Thanks much!
a pointer to where in the code this bug lives would be appreciated.
I took a quick look at bin/automake.in for regexps using %,
searching for "s/.*%". The one that looks suspicious to me is around
line 6966, in the fn preprocess_file:
# Substitute Automake template tokens.
s/(?: % \?? [\w\-]+ %
| \? !? [\w\-]+ \?
)/transform($&, %transform)/gex;
which looks like it's replacing more or less any word chars between two
% (or ?) signs with the result of calling the (passed) transform fn.
What exactly these "templates" and "transformations" are about, I'm
afraid I have no good idea. We'll have to dig in ... I hope you can, as
it will be a couple weeks (at best) before I can take any serious look
at the code.
Thanks again,
Karl
This bug report was last modified 23 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.