aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.rules7
-rw-r--r--tools/Makefile4
2 files changed, 11 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 0d4a0c8aed..5bddff8e8a 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -613,6 +613,13 @@ $(RecursiveTargets)::
endif
#-----------------------------------------------------------
+# Handle the OPTIONAL_PARALLEL_DIRS options for optional parallel construction
+#-----------------------------------------------------------
+ifdef OPTIONAL_PARALLEL_DIRS
+ PARALLEL_DIRS += $(foreach T,$(OPTIONAL_PARALLEL_DIRS),$(shell test -d $(PROJ_SRC_DIR)/$(T) && echo "$(T)"))
+endif
+
+#-----------------------------------------------------------
# Handle the PARALLEL_DIRS options for parallel construction
#-----------------------------------------------------------
ifdef PARALLEL_DIRS
diff --git a/tools/Makefile b/tools/Makefile
index 2726c1f3e4..519717ad98 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -8,6 +8,10 @@
##===----------------------------------------------------------------------===##
LEVEL := ..
+
+# Build clang if present.
+OPTIONAL_PARALLEL_DIRS := clang
+
# NOTE: The tools are organized into five groups of four consisting of one
# large and three small executables. This is done to minimize memory load
# in parallel builds. Please retain this ordering.