reduce #includes
[oota-llvm.git] / Makefile
index b8d4367e72be2bca3a8b497673eb7823179d8a33..ce79465dc8f6ef8beea93dfaf3d229699344d3b6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,12 +19,13 @@ LEVEL := .
 #
 # When cross-compiling, there are some things (tablegen) that need to
 # be build for the build system first.
+ifndef RC_ARCHS  # Normal build (not "Apple-style").
 ifeq ($(BUILD_DIRS_ONLY),1)
   DIRS := lib/System lib/Support utils
   OPTIONAL_DIRS :=
 else
   DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-config \
-          tools runtime docs
+          tools runtime docs unittests
   OPTIONAL_DIRS := examples projects bindings
 endif
 
@@ -62,7 +63,7 @@ ifeq ($(MAKECMDGOALS),install-clang)
 endif
 
 ifeq ($(MAKECMDGOALS),clang-only)
-  DIRS := $(filter-out tools runtime docs, $(DIRS)) tools/clang
+  DIRS := $(filter-out tools runtime docs unittests, $(DIRS)) tools/clang
   OPTIONAL_DIRS :=
 endif
 
@@ -144,7 +145,8 @@ FilesToConfig := \
   include/llvm/Config/config.h \
   include/llvm/Config/Targets.def \
        include/llvm/Config/AsmPrinters.def \
-  include/llvm/Support/DataTypes.h
+  include/llvm/Support/DataTypes.h \
+       tools/llvmc/plugins/Base/Base.td
 FilesToConfigPATH  := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
 
 all-local:: $(FilesToConfigPATH)
@@ -210,3 +212,8 @@ happiness: update all check unittests
 
 .NOTPARALLEL:
 
+else # Building "Apple-style."
+# N.B. In an Apple-style build, once configuration is done, lines
+# marked "Apple-style" are removed with sed!  See utils/buildit/build_llvm.
+include utils/buildit/GNUmakefile # Building "Apple-style."
+endif # Building "Apple-style."