aboutsummaryrefslogtreecommitdiff
path: root/Makefile.common
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-22 05:18:49 +0000
committerChris Lattner <sabre@nondot.org>2003-08-22 05:18:49 +0000
commitf0f463eb636bd27a78669a1bd702fe50c4ee694f (patch)
treed431de4f5013aa6a9d6d339ad2e956e6d1123fe1 /Makefile.common
parentda228ef560bbb2a18148da2ecf549e8d1be51d91 (diff)
Fix computation of LLVM_OBJ_ROOT for non-projects :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8046 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.common')
-rw-r--r--Makefile.common18
1 files changed, 11 insertions, 7 deletions
diff --git a/Makefile.common b/Makefile.common
index 47c5f7b5de..3bdee2ae15 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -116,18 +116,22 @@ endif
endif
#
-# Set the LLVM source directory.
-# It is typically the root directory of what we're compiling now.
+# Set the LLVM object directory.
#
-ifndef LLVM_SRC_ROOT
-LLVM_SRC_ROOT := $(BUILD_SRC_ROOT)
+ifndef LLVM_OBJ_ROOT
+ifdef LLVM_SRC_ROOT
+LLVM_OBJ_ROOT := $(shell cd $(BUILD_OBJ_DIR); cd $(LLVM_SRC_ROOT); pwd)
+else
+LLVM_OBJ_ROOT := $(shell cd $(BUILD_OBJ_DIR); cd $(LEVEL); pwd)
+endif
endif
#
-# Set the LLVM object directory.
+# Set the LLVM source directory.
+# It is typically the root directory of what we're compiling now.
#
-ifndef LLVM_OBJ_ROOT
-LLVM_OBJ_ROOT := $(shell cd $(BUILD_OBJ_DIR); cd $(LLVM_SRC_ROOT); pwd)
+ifndef LLVM_SRC_ROOT
+LLVM_SRC_ROOT := $(BUILD_SRC_ROOT)
endif
###########################################################################