summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitf2df8f3c9dd9d7013c9e26929704cc4cce4299b4 (patch)
tree775eecafc94b45356e369741bf84044291deb7fa /llvm/Makefile.common
parente9c210242da8b298223f8d1f17f7bc69f7f87f7b (diff)
downloadbcm5719-llvm-f2df8f3c9dd9d7013c9e26929704cc4cce4299b4.tar.gz
bcm5719-llvm-f2df8f3c9dd9d7013c9e26929704cc4cce4299b4.zip
Fix computation of LLVM_OBJ_ROOT for non-projects :(
llvm-svn: 8046
Diffstat (limited to 'llvm/Makefile.common')
-rw-r--r--llvm/Makefile.common18
1 files changed, 11 insertions, 7 deletions
diff --git a/llvm/Makefile.common b/llvm/Makefile.common
index 47c5f7b5dea..3bdee2ae158 100644
--- a/llvm/Makefile.common
+++ b/llvm/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
###########################################################################
OpenPOWER on IntegriCloud