help-make
[Top][All Lists]
Advanced

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

Re: Simulating multiple wildcards in a match using .SECONDEXPANSION?


From: Danny Boelens
Subject: Re: Simulating multiple wildcards in a match using .SECONDEXPANSION?
Date: Tue, 07 Apr 2009 09:33:39 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Michael R. Head wrote:
On Mon, 2009-04-06 at 14:15 +0200, Danny Boelens wrote:
Michael R. Head wrote:
I'm wondering if anyone has any suggestions on improving it. At a
minimum, I'd like to get rid of the foreachs in the targets.
>>
You can do that because you know how you constructed the cross product targets. In your case: if you replace the underscore ('_') with a space (' '), the cross product target falls apart into its components again:

True. But spaces in filenames are evil!

I agree. But I have a feeling you missed my point there. The thing is that your cross product files still have the underscore ('_') in their filename, so there won't be any spaces in filenames on disk. But at the same time the subst call can help in getting a (Makefile internal if you want) list with the a and b part of the cross product.

So for example you'll still have 'a1_b4' on disk, but 'a1 b4' after the subst to work with in your Makefile and get the prerequisites without the foreach stuff.

Bottom line: no evil spaces in filenames!

Anyway, that's all rather irrelevant if you like the other solution :-)

Best regards,
Danny




reply via email to

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