|
From: | Bryan Ischo |
Subject: | Re: Should this makefile really hang make? |
Date: | Sun, 20 Nov 2011 08:26:20 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111108 Thunderbird/8.0 |
On 11/20/11 06:14, Paul Smith wrote:
The ultimate problem is that the operator "%" is used in two contexts: it's used as the stem in a pattern rule and also inside functions like patsubst etc. In this situation those two operators conflict and there's no way, today, to disambiguate them.
Ah, that makes sense.Is there any validity to the argument that SECONDEXPANSION implies "second variable expansion", which implies that the variable expansion would happen before the pattern substitution (even for the purposes of creating variable names using the pattern)?
In other words, does it make sense to say that if I use SECONDEXPANSION I am implicitly saying that I want variable substitution to happen before pattern replacement? That's how I interpreted it but others may think differently.
If this strict ordering is not desired, then maybe it makes sense to add a substitute character that can be used in place of % for either the pattern rule or the function; I would think that allowing an alternate character inside the function would make the most sense since changing the pattern rule character would result in a different character used in the rule target than in the rule prerequisite.
Thanks, Bryan
[Prev in Thread] | Current Thread | [Next in Thread] |