summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-06-06 23:54:15 +0000
committerChris Lattner <sabre@nondot.org>2006-06-06 23:54:15 +0000
commit3e347f28f1a4fd96cb0d8728e1867ea09c9ec70f (patch)
tree4f0fc9ca587d4d94b0f138efab2e76a22425c7a3 /tools
parente8bd0a332ab43c30a7745381075a9749070b6a50 (diff)
downloadexternal_llvm-3e347f28f1a4fd96cb0d8728e1867ea09c9ec70f.zip
external_llvm-3e347f28f1a4fd96cb0d8728e1867ea09c9ec70f.tar.gz
external_llvm-3e347f28f1a4fd96cb0d8728e1867ea09c9ec70f.tar.bz2
Fix a bug in the following scenario.
1. llvm is built with objroot = OBJ and installed. 2. OBJ is deleted or install tree is shipped. 3. llvm-config is run. In this scenario, llvm-config shouldn't emit an error message at #3, it should just know it's not running in the objdir :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28704 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-config/llvm-config.in.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llvm-config/llvm-config.in.in b/tools/llvm-config/llvm-config.in.in
index 12d8a57..5f9c9d9 100644
--- a/tools/llvm-config/llvm-config.in.in
+++ b/tools/llvm-config/llvm-config.in.in
@@ -63,7 +63,8 @@ my $ABS_RUN_DIR = `cd $RUN_DIR/..; pwd`;
chomp($ABS_RUN_DIR);
# Compute the absolute object directory build, e.g. "foo/llvm/Debug".
-my $ABS_OBJ_ROOT = `cd $LLVM_OBJ_ROOT/$LLVM_BUILDMODE; pwd`;
+my $ABS_OBJ_ROOT = "$LLVM_OBJ_ROOT/$LLVM_BUILDMODE";
+$ABS_OBJ_ROOT = `cd $ABS_OBJ_ROOT; pwd` if (-d $ABS_OBJ_ROOT);
chomp($ABS_OBJ_ROOT);
my $INCLUDEDIR = "$ABS_RUN_DIR/include";