GNU bug report logs - #79266
Replacement (substitution) variable references not supported in TESTS

Previous Next

Package: automake;

Reported by: Richard Hansen <rhansen <at> rhansen.org>

Date: Mon, 18 Aug 2025 21:25:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Richard Hansen <rhansen <at> rhansen.org>
To: 79266 <at> debbugs.gnu.org
Subject: bug#79266: Replacement (substitution) variable references not supported in TESTS
Date: Mon, 18 Aug 2025 17:24:07 -0400
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

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.