Added the OPTIONAL_DIRS variable for specifying optional directories to build.

llvm-svn: 6926
This commit is contained in:
John Criswell 2003-06-27 16:58:44 +00:00
parent 8bf2e04b87
commit 8224df947c
2 changed files with 24 additions and 0 deletions

View File

@ -40,6 +40,7 @@
#
#===-----------------------------------------------------------------------====
#
# Configuration file to set paths specific to local installation of LLVM
#
include $(LEVEL)/Makefile.config
@ -340,6 +341,16 @@ test :: $(addsuffix /.maketest , $(PARALLEL_DIRS))
$(VERB) cd $(@D); $(MAKE) $(subst $(@D)/.make,,$@)
endif
ifdef OPTIONAL_DIRS
all install clean test ::
$(VERB) for dir in ${OPTIONAL_DIRS}; do \
if [ -d $$dir ]; \
then\
(cd $$dir; $(MAKE) $@) || exit 1; \
fi \
done
endif
#---------------------------------------------------------
# Handle the LIBRARYNAME option - used when building libs...
#---------------------------------------------------------
@ -489,6 +500,7 @@ $(USED_LIB_PATHS_G) $(USED_LIB_PATHS_O) $(USED_LIB_PATHS_P): \
$(addsuffix /.makeall, $(PARALLEL_DIRS))
all:: $(TOOLEXENAMES)
clean::
$(VERB) rm -f $(TOOLEXENAMES)

View File

@ -40,6 +40,7 @@
#
#===-----------------------------------------------------------------------====
#
# Configuration file to set paths specific to local installation of LLVM
#
include $(LEVEL)/Makefile.config
@ -340,6 +341,16 @@ test :: $(addsuffix /.maketest , $(PARALLEL_DIRS))
$(VERB) cd $(@D); $(MAKE) $(subst $(@D)/.make,,$@)
endif
ifdef OPTIONAL_DIRS
all install clean test ::
$(VERB) for dir in ${OPTIONAL_DIRS}; do \
if [ -d $$dir ]; \
then\
(cd $$dir; $(MAKE) $@) || exit 1; \
fi \
done
endif
#---------------------------------------------------------
# Handle the LIBRARYNAME option - used when building libs...
#---------------------------------------------------------
@ -489,6 +500,7 @@ $(USED_LIB_PATHS_G) $(USED_LIB_PATHS_O) $(USED_LIB_PATHS_P): \
$(addsuffix /.makeall, $(PARALLEL_DIRS))
all:: $(TOOLEXENAMES)
clean::
$(VERB) rm -f $(TOOLEXENAMES)