[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in
Chris Lattner
lattner at cs.uiuc.edu
Thu Jun 1 18:23:30 PDT 2006
Changes in directory llvm/tools/llvm-config:
llvm-config.in.in updated: 1.7 -> 1.8
---
Log message:
Add a gross "--use-current-dir-as-prefix" option as a temporary workaround
for the "build with one prefix and move the installed files to another dir"
problem.
---
Diffs of the changes: (+8 -0)
llvm-config.in.in | 8 ++++++++
1 files changed, 8 insertions(+)
Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.7 llvm/tools/llvm-config/llvm-config.in.in:1.8
--- llvm/tools/llvm-config/llvm-config.in.in:1.7 Thu Jun 1 20:04:35 2006
+++ llvm/tools/llvm-config/llvm-config.in.in Thu Jun 1 20:23:18 2006
@@ -27,6 +27,9 @@
my $LDFLAGS = q{@LLVM_LDFLAGS@};
#---- end Makefile values ----
+# Convert the current executable name into its directory (e.g. ".").
+my ($PARTIALDIR) = ($0 =~ /^(.*)\/.*$/);
+
sub usage;
sub fix_library_names (@);
sub expand_dependecies (@);
@@ -43,6 +46,11 @@
if ($arg =~ /^-/) {
if ($arg eq "--version") {
$has_opt = 1; print "$VERSION\n";
+ } elsif ($arg eq "--use-current-dir-as-prefix") {
+ # Convert the scripts executable dir into a full absolute directory.
+ my $ABSDIR = `cd $PARTIALDIR/..; pwd`;
+ chomp($ABSDIR);
+ $PREFIX = $ABSDIR;
} elsif ($arg eq "--prefix") {
$has_opt = 1; print "$PREFIX\n";
} elsif ($arg eq "--bindir") {
More information about the llvm-commits
mailing list