llvm.org GIT mirror llvm / 4a53e1e
Trying again to tweak the top-level Makefile to facilitate an Apple-style build. Now with Clang-compatibility. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84872 91177308-0d34-0410-b5e6-96231b3b80d8 Stuart Hastings 9 years ago
3 changed file(s) with 17 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1818 #
1919 # When cross-compiling, there are some things (tablegen) that need to
2020 # be build for the build system first.
21
22 # If "RC_ProjectName" exists in the environment, and its value is
23 # "llvmCore", then this is an "Apple-style" build; search for
24 # "Apple-style" in the comments for more info. Anything else is a
25 # normal build.
26 ifneq ($(RC_ProjectName),llvmCore) # Normal build (not "Apple-style").
2127 ifeq ($(BUILD_DIRS_ONLY),1)
2228 DIRS := lib/System lib/Support utils
2329 OPTIONAL_DIRS :=
210216
211217 .NOTPARALLEL:
212218
219 else # Building "Apple-style."
220 # In an Apple-style build, once configuration is done, lines marked
221 # "Apple-style" are removed with sed! Please don't remove these!
222 # Look for the string "Apple-style" in utils/buildit/build_llvm.
223 include $(shell find . -name GNUmakefile) # Building "Apple-style."
224 endif # Building "Apple-style."
5858 # NOTE : Always put version numbers at the end because they are optional.
5959 install: $(OBJROOT) $(SYMROOT) $(DSTROOT)
6060 cd $(OBJROOT) && \
61 $(SRC)/build_llvm "$(RC_ARCHS)" "$(TARGETS)" \
61 $(SRC)/utils/buildit/build_llvm "$(RC_ARCHS)" "$(TARGETS)" \
6262 $(SRC) $(PREFIX) $(DSTROOT) $(SYMROOT) \
6363 $(LLVM_ASSERTIONS) $(LLVM_OPTIMIZED) \
6464 $(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion)
8181 rm -rf $SRC_DIR || exit 1
8282 mkdir $SRC_DIR || exit 1
8383 ln -s $ORIG_SRC_DIR/* $SRC_DIR/ || exit 1
84 # We can't use the top-level Makefile as-is. Remove the soft link:
85 rm $SRC_DIR/Makefile || exit 1
86 # Now create our own by editing the top-level Makefile, deleting every line marked "Apple-style":
87 sed -e '/[Aa]pple-style/d' -e '/include.*GNUmakefile/d' $ORIG_SRC_DIR/Makefile > $SRC_DIR/Makefile || exit 1
8488
8589 # Build the LLVM tree universal.
8690 mkdir -p $DIR/obj-llvm || exit 1