help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multiple percent signs in single prerequisite - revisited


From: Peter Apian-Bennewitz
Subject: Re: multiple percent signs in single prerequisite - revisited
Date: Tue, 19 Jul 2022 17:02:54 +0200

the work-around works like a charm, thanks for speedy solution,
best, Peter

On 7/19/22 16:05, Paul Smith wrote:
On Tue, 2022-07-19 at 08:44 +0200, Peter Apian-Bennewitz wrote:
A rule like

       %.mp4: %/%.mov
or
      %.mp4: foo_%_%.bar

substitutes only the first % while looking for matching
prerequisites. - why ?
Because that's the way it was implemented, and documented, and that's
the way it's always worked...

I know of no reason other than that's how Roland (or RMS?  Not sure who
created pattern rules back in the day) did it.  At this point there
would be a backward-compatibility problem with trying to change it.

You can get around this if you use secondary expansion[1] capabilities:

   .SECONDEXPANSION:

   %.mp4: $$*/$$*/mov

or

   %.mp4: foo_$$*_$$*.bar



[1] https://www.gnu.org/software/make/manual/html_node/Secondary-Expansion.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]