lit: Warn when a test suite contains no tests.
[oota-llvm.git] / Makefile
index ce79465dc8f6ef8beea93dfaf3d229699344d3b6..671f92c77e87d3c1b2bcc9b95a2bee28fdb2344b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,7 +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").
+
+# If "RC_ProjectName" exists in the environment, and its value is
+# "llvmCore", then this is an "Apple-style" build; search for
+# "Apple-style" in the comments for more info.  Anything else is a
+# normal build.
+ifneq ($(findstring llvmCore, $(RC_ProjectName)),llvmCore)  # Normal build (not "Apple-style").
+
 ifeq ($(BUILD_DIRS_ONLY),1)
   DIRS := lib/System lib/Support utils
   OPTIONAL_DIRS :=
@@ -89,6 +95,8 @@ cross-compile-build-tools:
        $(Verb) if [ ! -f BuildTools/Makefile ]; then \
           $(MKDIR) BuildTools; \
          cd BuildTools ; \
+         unset CFLAGS ; \
+         unset CXXFLAGS ; \
          $(PROJ_SRC_DIR)/configure --build=$(BUILD_TRIPLE) \
                --host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE); \
          cd .. ; \
@@ -128,8 +136,7 @@ dist-hook::
        $(Echo) Eliminating files constructed by configure
        $(Verb) $(RM) -f \
          $(TopDistDir)/include/llvm/Config/config.h  \
-         $(TopDistDir)/include/llvm/Support/DataTypes.h  \
-         $(TopDistDir)/include/llvm/Support/ThreadSupport.h
+         $(TopDistDir)/include/llvm/System/DataTypes.h
 
 clang-only: all
 tools-only: all
@@ -145,7 +152,7 @@ FilesToConfig := \
   include/llvm/Config/config.h \
   include/llvm/Config/Targets.def \
        include/llvm/Config/AsmPrinters.def \
-  include/llvm/Support/DataTypes.h \
+  include/llvm/System/DataTypes.h \
        tools/llvmc/plugins/Base/Base.td
 FilesToConfigPATH  := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
 
@@ -213,7 +220,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."
+# In an Apple-style build, once configuration is done, lines marked
+# "Apple-style" are removed with sed!  Please don't remove these!
+# Look for the string "Apple-style" in utils/buildit/build_llvm.
+include $(shell find . -name GNUmakefile) # Building "Apple-style."
 endif # Building "Apple-style."