|
From: | Fairweather, James |
Subject: | ways of recursing into subdirectory |
Date: | Sun, 1 Dec 2002 22:34:50 -0800 |
I'm using make in a recursive fashion, and I was wondering if there's some nicer way than the two I can think of for doing this:
I have something like this:
SUBDIRS = foo bar
all:
for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir; done
which works fine, but it's using the shell's for function.
Also, I have this:
SUBDIRS = foo bar
ALLDIR = $(addsuffix .all,$(SUBDIRS))
all: $(ALLDIR)
%.all:
$(MAKE) -C $*
Are there other ways? Is one way preferred over another?
[Prev in Thread] | Current Thread | [Next in Thread] |