Reduce work done for directory traversal in srcdir==objdir builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29300 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-07-26 20:22:26 +00:00
parent d8e421d40a
commit 8203360bc1

View File

@ -487,6 +487,8 @@ $(PROJ_etcdir): $(PROJ_etcdir)/.dir
SubDirs :=
ifdef DIRS
SubDirs += $(DIRS)
ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
$(RecursiveTargets)::
$(Verb) for dir in $(DIRS); do \
if [ ! -f $$dir/Makefile ]; then \
@ -495,6 +497,13 @@ $(RecursiveTargets)::
fi; \
($(MAKE) -C $$dir $@ ) || exit 1; \
done
else
$(RecursiveTargets)::
$(Verb) for dir in $(DIRS); do \
($(MAKE) -C $$dir $@ ) || exit 1; \
done
endif
endif
#---------------------------------------------------------
@ -545,6 +554,7 @@ ifdef OPTIONAL_DIRS
SubDirs += $(OPTIONAL_DIRS)
ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
$(RecursiveTargets)::
$(Verb) for dir in $(OPTIONAL_DIRS); do \
if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\
@ -555,6 +565,12 @@ $(RecursiveTargets)::
($(MAKE) -C$$dir $@ ) || exit 1; \
fi \
done
else
$(RecursiveTargets)::
$(Verb) for dir in $(OPTIONAL_DIRS); do \
($(MAKE) -C$$dir $@ ) || exit 1; \
done
endif
endif
#---------------------------------------------------------