%% 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.
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make