I already have a rule similar to this (no clean) because in the normal case,
I want to descend the directories and run straight make. What I'd like to do
is give a target, say cleanup, that descends, cleans in the descended
directory, then cleans in the current directory. Thats where the complication
comes in.
> $(SUBDIRS):
> $(MAKE) -C $@ clean
On Wednesday 09 May 2001 04:03 pm, Paul D. Smith wrote:
> %% Barry D Benowitz <[EMAIL PROTECTED]> writes:
>
> bdb> I have a variable with a list of subdirectories. I would like a
> bdb> rule to descend these subdirectories, then run make clean in each
> bdb> sub directory. Then I would like to do a make clean in the
> bdb> current directory; How can I do that?
>
> # ---
> SUBDIRS = foo bar biz baz boz
>
> .PHONY: $(SUBDIRS)
>
> clean: $(SUBDIRS)
>
> : do some cleaning in the current directory
>
> $(SUBDIRS):
> $(MAKE) -C $@ clean
> # ---
>
>
> Note this will only work with GNU make. If you can't rely on having GNU
> make, you can still do it but it's harder and less functional.
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make