aboutsummaryrefslogtreecommitdiff
path: root/Makefile.config.in
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2011-10-16 02:54:26 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2011-10-16 02:54:26 +0000
commite5ab51d51f6e5cebf57db76c7f8527febc6a2b71 (patch)
tree9846842a0f8954b71f3e6196df9e684cbd413534 /Makefile.config.in
parenta87a7dba537f671eceac6cb6600d6cb5354ff2e5 (diff)
autoconf: Introduce --with-clang-srcdir, to build out-of-tree clang as tools/clang on tools/Makefile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142102 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.config.in')
-rw-r--r--Makefile.config.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile.config.in b/Makefile.config.in
index fff482e777..9755a5de07 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -46,11 +46,19 @@ realpath = $(shell cd $(1); $(PWD))
PROJ_OBJ_DIR := $(call realpath, .)
PROJ_OBJ_ROOT := $(call realpath, $(PROJ_OBJ_DIR)/$(LEVEL))
+CLANG_SRC_ROOT := @CLANG_SRC_ROOT@
+
ifeq ($(PROJECT_NAME),llvm)
LLVM_SRC_ROOT := $(call realpath, @abs_top_srcdir@)
LLVM_OBJ_ROOT := $(call realpath, @abs_top_builddir@)
PROJ_SRC_ROOT := $(LLVM_SRC_ROOT)
-PROJ_SRC_DIR := $(call realpath, $(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)))
+PROJ_SRC_DIR := $(LLVM_SRC_ROOT)$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))
+
+ifneq ($(CLANG_SRC_ROOT),)
+ CLANG_SRC_ROOT:= $(call realpath, $(CLANG_SRC_ROOT))
+ PROJ_SRC_DIR := $(patsubst $(LLVM_SRC_ROOT)/tools/clang%,$(CLANG_SRC_ROOT)%,$(PROJ_SRC_DIR))
+endif
+
prefix := @prefix@
PROJ_prefix := $(prefix)
PROJ_VERSION := $(LLVMVersion)