Subject: Re: New make modifiers: :C///W, :tW, and :[]
To: David Laight <>
From: Frederick Bruckman <>
List: tech-userlevel
Date: 07/31/2003 11:10:55
On Thu, 31 Jul 2003, David Laight wrote:

> > So, my questions are:
> >
> >  * should we implement :[] or :t[], and if so, which one?
> >  * should we implement :tW and :tw?
> >  * should we implement :C///W and :S///W?
> I'd go for :[] as being (slighlty) more obvious and rather more powerful.

Ditto. The ":[]" notation mirrors well-known shell constructs, and
is therefore immediately comprehensible, whereas some of the other
examples were making my eyes glaze over.

> ${x:[$y]} looks a useful tool for obfuscating things :-)

That gives me an idea. Take the shell analogy further, and let :[#]
be the number of modifiers, so the notation for the last word becomes
${x:[$x:[#]]}, and if "make" could do shell arithmetic, the second to
the last word would be ${x:[$(($x:[#] - 1))].