diff --git a/Makefile.config.in b/Makefile.config.in
index fff482e..9755a5d 100644
|
a
|
b
|
realpath = $(shell cd $(1); $(PWD)) |
| 46 | 46 | PROJ_OBJ_DIR := $(call realpath, .) |
| 47 | 47 | PROJ_OBJ_ROOT := $(call realpath, $(PROJ_OBJ_DIR)/$(LEVEL)) |
| 48 | 48 | |
| | 49 | CLANG_SRC_ROOT := @CLANG_SRC_ROOT@ |
| | 50 | |
| 49 | 51 | ifeq ($(PROJECT_NAME),llvm) |
| 50 | 52 | LLVM_SRC_ROOT := $(call realpath, @abs_top_srcdir@) |
| 51 | 53 | LLVM_OBJ_ROOT := $(call realpath, @abs_top_builddir@) |
| 52 | 54 | PROJ_SRC_ROOT := $(LLVM_SRC_ROOT) |
| 53 | | PROJ_SRC_DIR := $(call realpath, $(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))) |
| | 55 | PROJ_SRC_DIR := $(LLVM_SRC_ROOT)$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)) |
| | 56 | |
| | 57 | ifneq ($(CLANG_SRC_ROOT),) |
| | 58 | CLANG_SRC_ROOT:= $(call realpath, $(CLANG_SRC_ROOT)) |
| | 59 | PROJ_SRC_DIR := $(patsubst $(LLVM_SRC_ROOT)/tools/clang%,$(CLANG_SRC_ROOT)%,$(PROJ_SRC_DIR)) |
| | 60 | endif |
| | 61 | |
| 54 | 62 | prefix := @prefix@ |
| 55 | 63 | PROJ_prefix := $(prefix) |
| 56 | 64 | PROJ_VERSION := $(LLVMVersion) |
diff --git a/Makefile.rules b/Makefile.rules
index d057f04..54c3780 100644
|
a
|
b
|
endif |
| 806 | 806 | # Handle the OPTIONAL_PARALLEL_DIRS options for optional parallel construction |
| 807 | 807 | #----------------------------------------------------------- |
| 808 | 808 | ifdef OPTIONAL_PARALLEL_DIRS |
| 809 | | PARALLEL_DIRS += $(foreach T,$(OPTIONAL_PARALLEL_DIRS),$(shell test -d $(PROJ_SRC_DIR)/$(T) && echo "$(T)")) |
| | 809 | PARALLEL_DIRS += $(foreach T,$(OPTIONAL_PARALLEL_DIRS),$(shell test -d $(PROJ_SRC_DIR)/$(T) -o -f $(T)/Makefile && echo "$(T)")) |
| 810 | 810 | endif |
| 811 | 811 | |
| 812 | 812 | #----------------------------------------------------------- |
| … |
… |
unitcheck:: $(addsuffix /.makeunitcheck,$(PARALLEL_DIRS)) |
| 828 | 828 | ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T)) |
| 829 | 829 | |
| 830 | 830 | $(ParallelTargets) : |
| 831 | | $(Verb) if ([ ! -f $(@D)/Makefile ] || \ |
| 832 | | command test $(@D)/Makefile -ot \ |
| 833 | | $(PROJ_SRC_DIR)/$(@D)/Makefile ); then \ |
| 834 | | $(MKDIR) $(@D); \ |
| 835 | | $(CP) $(PROJ_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \ |
| | 831 | $(Verb) \ |
| | 832 | SD=$(PROJ_SRC_DIR)/$(@D); \ |
| | 833 | DD=$(@D); \ |
| | 834 | if [ ! -f $$SD/Makefile ]; then \ |
| | 835 | SD=$(@D); \ |
| | 836 | DD=$(notdir $(@D)); \ |
| | 837 | fi; \ |
| | 838 | if ([ ! -f $$DD/Makefile ] || \ |
| | 839 | command test $$DD/Makefile -ot \ |
| | 840 | $$SD/Makefile ); then \ |
| | 841 | $(MKDIR) $$DD; \ |
| | 842 | $(CP) $$SD/Makefile $$DD/Makefile; \ |
| 836 | 843 | fi; \ |
| 837 | | $(MAKE) -C $(@D) $(subst $(@D)/.make,,$@) |
| | 844 | $(MAKE) -C $$DD $(subst $(@D)/.make,,$@) |
| 838 | 845 | endif |
| 839 | 846 | |
| 840 | 847 | #--------------------------------------------------------- |
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 85fe8d4..c28ff7f 100644
|
a
|
b
|
case "$withval" in |
| 795 | 795 | *) AC_MSG_ERROR([Invalid path for --with-ocaml-libdir. Provide full path]) ;; |
| 796 | 796 | esac |
| 797 | 797 | |
| | 798 | AC_ARG_WITH(clang-srcdir, |
| | 799 | AS_HELP_STRING([--with-clang-srcdir], |
| | 800 | [Directory to the out-of-tree Clang source]),, |
| | 801 | withval="-") |
| | 802 | case "$withval" in |
| | 803 | -) clang_src_root="" ;; |
| | 804 | /* | [[A-Za-z]]:[[\\/]]*) clang_src_root="$withval" ;; |
| | 805 | *) clang_src_root="$ac_pwd/$withval" ;; |
| | 806 | esac |
| | 807 | AC_SUBST(CLANG_SRC_ROOT,[$clang_src_root]) |
| | 808 | |
| 798 | 809 | AC_ARG_WITH(clang-resource-dir, |
| 799 | 810 | AS_HELP_STRING([--with-clang-resource-dir], |
| 800 | 811 | [Relative directory from the Clang binary for resource files]),, |
diff --git a/test/Makefile b/test/Makefile
index c0bc36c..b1550df 100644
|
a
|
b
|
extra-lit-site-cfgs:: |
| 59 | 59 | |
| 60 | 60 | ifneq ($(strip $(filter check-local-all,$(MAKECMDGOALS))),) |
| 61 | 61 | ifndef TESTSUITE |
| 62 | | ifeq ($(shell test -d $(PROJ_SRC_DIR)/../tools/clang && echo OK), OK) |
| | 62 | ifeq ($(shell test -f $(PROJ_OBJ_DIR)/../tools/clang/Makefile && echo OK), OK) |
| 63 | 63 | LIT_ALL_TESTSUITES += $(PROJ_OBJ_DIR)/../tools/clang/test |
| 64 | 64 | |
| 65 | 65 | # Force creation of Clang's lit.site.cfg. |
diff --git a/tools/Makefile b/tools/Makefile
index 68ce314..2da3917 100644
|
a
|
b
|
|
| 9 | 9 | |
| 10 | 10 | LEVEL := .. |
| 11 | 11 | |
| | 12 | include $(LEVEL)/Makefile.config |
| | 13 | |
| 12 | 14 | # Build clang if present. |
| 13 | | OPTIONAL_PARALLEL_DIRS := clang |
| | 15 | |
| | 16 | ifneq ($(CLANG_SRC_ROOT),) |
| | 17 | OPTIONAL_PARALLEL_DIRS := $(CLANG_SRC_ROOT) |
| | 18 | else |
| | 19 | OPTIONAL_PARALLEL_DIRS := clang |
| | 20 | endif |
| 14 | 21 | |
| 15 | 22 | # Build LLDB if present. Note LLDB must be built last as it depends on the |
| 16 | 23 | # wider LLVM infrastructure (including Clang). |
| … |
… |
ifdef ONLY_TOOLS |
| 36 | 43 | PARALLEL_DIRS := $(filter-out lldb,$(ONLY_TOOLS)) |
| 37 | 44 | endif |
| 38 | 45 | |
| 39 | | include $(LEVEL)/Makefile.config |
| 40 | | |
| 41 | | |
| 42 | 46 | # These libraries build as dynamic libraries (.dylib /.so), they can only be |
| 43 | 47 | # built if ENABLE_PIC is set. |
| 44 | 48 | ifndef ONLY_TOOLS |