[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Interating over Target List with Jobs?
From: |
Philip Guenther |
Subject: |
Re: Interating over Target List with Jobs? |
Date: |
Mon, 31 May 2010 16:22:49 -0700 |
On Sun, May 30, 2010 at 3:30 PM, Erik Rull <address@hidden> wrote:
> Per Jessen wrote:
...
>> clean1:
>> make -C mod1 clean
>> clean2:
>> make -C mod2 clean
...
>> clean: clean1 clean2 clean3 clean4 clean5
>
> Hm, well, yes - this could be possbile - but quite brute-force ;-)
> If I add a new module, just the list of targets gets extended and I've
> nothing to change in the makefile - with your approach a new clean rule must
> be added manually.
If only there was some way to express a set of rules that all followed
a pattern. We could even call them "pattern rules"...
clean-%:
${MAKE} -C ${@:clean-%=%} clean
clean: $(foreach mod,${MODULE_LIST},clean-${mod})
Philip Guenther