aboutsummaryrefslogtreecommitdiff
path: root/Makefile.common
diff options
context:
space:
mode:
authorJohn Criswell <criswell@uiuc.edu>2003-06-27 16:58:44 +0000
committerJohn Criswell <criswell@uiuc.edu>2003-06-27 16:58:44 +0000
commit2a6530f91ad3fc7701cce87b99e2566dc621497a (patch)
treecde7d1c2b0bba03043e736f0f41158d3faa90e0b /Makefile.common
parentacd48e43830de668958fbc3a4f0d7d05461d172e (diff)
Added the OPTIONAL_DIRS variable for specifying optional directories to build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6926 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.common')
-rw-r--r--Makefile.common12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile.common b/Makefile.common
index 9a69fc4c7a..88cdd97c00 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -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)