Hi Paul et. al.,

When a rule has multiple prerequisites I sometimes use make variables to refer 
to them positionally, like this:

^1=$(word 1,$^)
^2=$(word 2,$^)
^3=$(word 3,$^)
^2..=$(wordlist 2,$(words $^),$^)
^3..=$(wordlist 3,$(words $^),$^)

%.foo: %.bar %.baz %.bat1 %.bat2 %.bat3
        process --baz ${^2}--bar ${^1} --bat ${^3..} > $@

What do you think of such syntactic sugar?  

Is there any sweeter version?

Is there some way to bind pattern specific variables to prerequisite using some 
syntax allowing rules such as: 

%.foo: a:=%.bar b:=%.baz c:=%.bat1 %.bat2 %.bat3
        process --baz ${b}--bar ${a} --bat ${c} > $@

Might this be candidate for a new feature request?  Are there any other similar 
such ideas percolating?

FWIW - I mainly use make to structure bioinformatics analysis pipelines.

Cheers,

Malcolm Cook
Manager, Database Applications
Big Data AI and GenomicsĀ 
Stowers Institute for Medical Research


Reply via email to