From 91e8c9ff669f497cbc8ef9964d1d420bb2114b6f Mon Sep 17 00:00:00 2001 From: mindon Date: Fri, 13 Nov 2015 08:25:28 +0800 Subject: [PATCH] Fix make failed with wrong Makefile path of llvm under OS X issue: https://github.com/rust-lang/rust/issues/24887 make error make[2]: *** No rule to make target '/home/lab/rust/src/llvm/home/lab/rust/x86_64-apple-darwin/llvm/Makefile', needed by 'Makefile'. Stop. the **/home/lab/rust/** part repeated issue --- Makefile.config.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.config.in b/Makefile.config.in index a4d641040f33..bad41b535d88 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -56,7 +56,7 @@ ifeq ($(PROJECT_NAME),$(LLVMPackageName)) 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 := $(LLVM_SRC_ROOT)$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)) +PROJ_SRC_DIR := $(patsubst $(PROJ_OBJ_ROOT)%,$(LLVM_SRC_ROOT)%,$(PROJ_OBJ_DIR)) ifneq ($(CLANG_SRC_ROOT),) CLANG_SRC_ROOT:= $(call realpath, $(CLANG_SRC_ROOT)) @@ -83,7 +83,7 @@ endif ifndef LLVM_OBJ_ROOT $(error Projects must define LLVM_OBJ_ROOT) endif -PROJ_SRC_DIR := $(call realpath, $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))) +PROJ_SRC_DIR := $(call realpath, $(patsubst $(PROJ_OBJ_ROOT)%,$(PROJ_SRC_ROOT)%,$(PROJ_OBJ_DIR))) prefix := $(PROJ_INSTALL_ROOT) PROJ_prefix := $(prefix) ifndef PROJ_VERSION