<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">FYI, this patch has been reverted. It breaks the mingw build.<div><br></div><div>Please see Julien's email to llvm-commits.</div><div><br></div><div>-Tanya</div><div><br><div><div>On Nov 3, 2008, at 2:45 PM, Sascha Othman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>llvm-config uses shell scripting instead of perl functions to determine<br>llvm's installation directories, which is not very portable. This patch<br>is an attempt to fix that by using perl's Cwd functions.<br>Please review twice and don't be too harsh with me since I'm not<br>especially experienced at this kind of thing.<br><br>Regards,<br>Sascha<br>--- llvm-config.in.in<span class="Apple-tab-span" style="white-space:pre"> </span>2008-11-03 22:28:01.000000000 +0100<br>+++ llvm-config.in.in.patched<span class="Apple-tab-span" style="white-space:pre"> </span>2008-11-03 22:32:56.000000000 +0100<br>@@ -18,6 +18,7 @@<br> use 5.006;<br> use strict;<br> use warnings;<br>+use Cwd;<br><br> #---- begin autoconf values ----<br> my $PACKAGE_NAME = q{@PACKAGE_NAME@};<br>@@ -64,21 +65,13 @@<br> # Convert the current executable name into its directory (e.g. ".").<br> my ($RUN_DIR) = ($0 =~ /^(.*)\/.*$/);<br><br>-# Find the unix pwd program: we don't want to use the bash builtin, as it does<br>-# not look through symlinks etc.<br>-my $PWD = `which pwd`;<br>-chomp($PWD);<br>-$PWD = "pwd" if (!-e $PWD);<br>-<br> # Turn the directory into an absolute directory on the file system, also pop up<br> # from "bin" into the build or prefix dir.<br>-my $ABS_RUN_DIR = `cd $RUN_DIR/..; $PWD`;<br>-chomp($ABS_RUN_DIR);<br>+my $ABS_RUN_DIR = Cwd::realpath("$RUN_DIR/..");<br><br> # Compute the absolute object directory build, e.g. "foo/llvm/Debug".<br> my $ABS_OBJ_ROOT = "$LLVM_OBJ_ROOT/$LLVM_BUILDMODE";<br>-$ABS_OBJ_ROOT = `cd $ABS_OBJ_ROOT; $PWD` if (-d $ABS_OBJ_ROOT);<br>-chomp($ABS_OBJ_ROOT);<br>+$ABS_OBJ_ROOT = Cwd::realpath($ABS_OBJ_ROOT) if (-d $ABS_OBJ_ROOT);<br><br> my $INCLUDEDIR = "$ABS_RUN_DIR/include";<br> my $LIBDIR = "$ABS_RUN_DIR/lib";<br>@@ -142,9 +135,9 @@<br> } elsif ($arg eq "--build-mode") {<br> $has_opt = 1; print "$LLVM_BUILDMODE\n";<br> } elsif ($arg eq "--obj-root") {<br>- $has_opt = 1; print `cd $LLVM_OBJ_ROOT/; $PWD`;<br>+ $has_opt = 1; print Cwd::realpath($LLVM_OBJ_ROOT);<br> } elsif ($arg eq "--src-root") {<br>- $has_opt = 1; print `cd $LLVM_SRC_ROOT/; $PWD`;<br>+ $has_opt = 1; print Cwd::realpath($LLVM_SRC_ROOT);<br> } else {<br> usage();<br> }<br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></div></blockquote></div><br></div></body></html>