summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-05-09 16:22:53 -0600
committerBrian <brian@yutani.localnet.net>2007-05-09 16:23:11 -0600
commit16c503f39a05726f3e994e42cb1c03e0a308b80d (patch)
tree1603daefea6ba5c115a4a4fed027e2838df4a153 /Makefile
parent4d5d4e1f97bf8d5c55ef817f7a28f920accc151b (diff)
Tweak the shell scripting for descending into and building subdirs.
In general, use this: @for dir in $(SUBDIRS) ; do \ if [ -d $$dir ] ; then \ (cd $$dir && $(MAKE)) || exit 1; \ fi \ done Basically, silently skip missing subdirs but generate an error and stop if there's a compilation or install problem. This was done inconsistantly before. In once case, a missing subdir was causing us to go into an infinte loop!
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 88b6b79979..4984e4dceb 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,9 @@ SUBDIRS = src progs
default: $(TOP)/configs/current
@for dir in $(SUBDIRS) ; do \
- (cd $$dir ; $(MAKE)) || exit 1 ; \
+ if [ -d $$dir ] ; then \
+ (cd $$dir && $(MAKE)) || exit 1 ; \
+ fi \
done
@@ -16,7 +18,9 @@ doxygen:
clean:
@for dir in $(SUBDIRS) ; do \
- (cd $$dir ; $(MAKE) clean) ; \
+ if [ -d $$dir ] ; then \
+ (cd $$dir && $(MAKE) clean) ; \
+ fi \
done
@@ -34,9 +38,12 @@ realclean:
install:
@for dir in $(SUBDIRS) ; do \
- (cd $$dir ; $(MAKE) install) || exit 1 ; \
+ if [ -d $$dir ] ; then \
+ (cd $$dir && $(MAKE) install) || exit 1 ; \
+ fi \
done
+
# DirectFBGL module installation
linux-directfb-install:
cd src/mesa/drivers/directfb && $(MAKE) install