[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A newbie question
From: |
Paul D. Smith |
Subject: |
Re: A newbie question |
Date: |
Wed, 9 May 2001 16:03:10 -0400 |
%% Barry D Benowitz <address@hidden> 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 <address@hidden> 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
- A newbie question, Barry D Benowitz, 2001/05/09
- Re: A newbie question,
Paul D. Smith <=