diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-06-08 20:34:18 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-06-08 20:34:18 +0000 |
commit | afed099bd2e759efd4bb63fdc525d3445f94cc13 (patch) | |
tree | 614ee41fe363b5cd45cec8876dd7d68db101ba4c /Makefile | |
parent | 7a4026211750cf4f387251956a8ade2a19b28998 (diff) |
Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.
- This eliminates most dependencies on how Clang is installed relative to LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105637 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 32 |
1 files changed, 31 insertions, 1 deletions
@@ -1,4 +1,19 @@ -LEVEL = ../.. +##===- Makefile --------------------------------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +# If CLANG_LEVEL is not set, then we are the top-level Makefile. Otherwise, we +# are being included from a subdirectory makefile. + +ifndef CLANG_LEVEL + +IS_TOP_LEVEL := 1 +CLANG_LEVEL := . DIRS := include lib tools docs PARALLEL_DIRS := @@ -6,9 +21,22 @@ PARALLEL_DIRS := ifeq ($(BUILD_EXAMPLES),1) PARALLEL_DIRS += examples endif +endif + +### +# Common Makefile code, shared by all Clang Makefiles. +# Set LLVM source root level. +LEVEL := $(CLANG_LEVEL)/../.. + +# Include LLVM common makefile. include $(LEVEL)/Makefile.common +### +# Clang Top Level specific stuff. + +ifeq ($(IS_TOP_LEVEL),1) + ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) $(RecursiveTargets):: $(Verb) if [ ! -f test/Makefile ]; then \ @@ -37,3 +65,5 @@ cscope.files: -or -name '*.h' > cscope.files .PHONY: test report clean cscope.files + +endif |