[jamming] The right way to do
Craig Allsop
cjamallsop at gmail.com
Sun Nov 18 15:25:56 PST 2007
Hi.
> I was just wondering if there was a shorter way than always having to
> add grist for source and destination, set the LOCATE and SEARCH
> variables for each target. Plus calling the Clean and Depends rules.
>
> If I want to write a rule with 2 parameters, I have to write 6 lines
> that are always the same, whatever I do. I mean, sometimes it is not
> possible to group rules like you suggested. For example a LaTeX rule
> and an Xslt rule are not the same at all, but, they both have these 6
> lines that never change.
> I would rather prefer a syntax like :
>
> local dest, source = [ Param $(1) : $(2) ] ;
>
> And it would magicly add the grist to $(1), MakeLocate it and return it
> to $(dest). And add grist to $(2), set the SEARCH variable and return
> it to $(source).
> Unfortunately I think Jam doesn't support multiple variable assignment.
No, it doesn't, but you could return a list, i.e.
local dest = $(param[1]) ;
local sources = $(param[2-]) ;
Although I believe there is probably an easier solution if I
understood the bigger picture of how these rules are called. I'd be
happy to discuss it further by direct email.
Craig.
More information about the jamming
mailing list