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