Quoting John Breitenbach <[email protected]>:
lf/% af/% nf/% pf/%:
do_stuff()
My intent is to invoke the same function for any make target with one
of the 4 subdirs listed above.
There are dependencies between them. e.g., lf/abc depends on af/abc
and nf/aaa. af/abc
depends on pf/ppp while nf/aaa depends on pf/p1... Thus there are
opportunities for parallel.
I'm not sure, from your email, if you're aware of what the rule you're
writing actually means. A pattern rule with multiple target patterns
means that one invocation of the recipe will build ALL the listed
targets. So, if make decides to build lf/abc and it chooses this
pattern rule to do it, then it will expect that that single invocation
of do_stuff() will build not only lf/abc, but also af/abc, nf/abc,
and pf/abc.
If that's not what you want, then you'll have to define the rule
four times:
lf/%:
do_stuff()
af/%:
do_stuff()
nf/%:
do_stuff()
pf/%:
do_stuff()
Read about pattern rules in the GNU make manual.
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make