On Mon, 2009-04-06 at 14:15 +0200, Danny Boelens wrote:
> Michael R. Head wrote:
> > I'd like to make a rule that generates a output file for each pair in
> > the cross product of two lists of input files. I have a simple makefile
> > that does what I want, but it's ugly.
> >
> > 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! > But looking at your original problem description, I think I'd use > another approach to solve it. One using a define as 'rule template', > because it's a bit easier to read and understand in my opinion - but > that might be just me. Something like this (untested): Ah! I didn't know about rule templates. That is definitely much nicer, and something I will have to incorporate into my Make repertoire. > Hope this helps, > Danny thanks, mike -- Michael R. Head <[email protected]> http://www.cs.binghamton.edu/~mike/
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
