summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2012-11-15 17:36:28 +0100
committerJan Holesovsky <kendy@suse.cz>2012-11-15 17:39:52 +0100
commit2c1555a5504162ec36704cc0156f3c0f2b0bc59b (patch)
tree61ab4e79f381888eaabd5ce012314d2e9ff90f75 /solenv
parentf1dfc1f23f83f410172170d7b80d8f987f04635a (diff)
Fix linkoo to work with MinGW again.
Change-Id: I26bcc8f2026872729f5f4658c46c3226df3749f7
Diffstat (limited to 'solenv')
-rwxr-xr-xsolenv/bin/linkoo14
1 files changed, 11 insertions, 3 deletions
diff --git a/solenv/bin/linkoo b/solenv/bin/linkoo
index 3e2d08fbcf43..96abfa6467af 100755
--- a/solenv/bin/linkoo
+++ b/solenv/bin/linkoo
@@ -61,6 +61,7 @@ my $TARGET;
my $LIBVER;
my $OOO_BUILD;
my $OOO_INSTALL;
+my $SOLARVER;
if ($ENV{'OS'} eq 'MACOSX') {
print "FIXME: linkoo currently does not work on Mac OS X\n";
@@ -108,8 +109,15 @@ File::Spec->file_name_is_absolute($OOO_BUILD) || die "linkoo requires absolute p
($TARGET, $LIBVER, $LANG) = sniff_target ($OOO_BUILD);
+$SOLARVER = "$OOO_BUILD/solver";
+
if ($TARGET =~ /^wntgcci/ || $TARGET =~ /^wntmsci[0-9]+/) {
$windows = 1;
+}
+
+if ($TARGET =~ /^wntmsci[0-9]+/) {
+ # wntgcci means are cross-compiling & can symlink, so copy only on real
+ # Windows
$copy = 1;
}
@@ -329,7 +337,7 @@ sub scan_and_link_files($$$)
}
# Now scan the solver
- scan_one_dir ($installed_files, \%build_files, "$ENV{'SOLARVER'}/$target", 1);
+ scan_one_dir ($installed_files, \%build_files, "$SOLARVER/$target", 1);
for my $file (keys %build_files) {
my $src = $build_files{$file};
@@ -393,7 +401,7 @@ sub link_gdb_py()
my $dirh;
my @basis;
my @ure;
- my $src = "$ENV{'SOLARVER'}/$TARGET/lib";
+ my $src = "$SOLARVER/$TARGET/lib";
opendir ($dirh, $src) || die "can't open solver: $src: $!";
while (my $dent = readdir ($dirh)) {
$dent =~ /^\./ && next;
@@ -423,7 +431,7 @@ sub link_pagein_files()
return if ($windows);
print "pagein case:";
- my $src = "$ENV{'SOLARVER'}/$TARGET/bin";
+ my $src = "$SOLARVER/$TARGET/bin";
my $dest = "$OOO_INSTALL/" . $brand_program_dir;
for my $c ('calc', 'draw', 'impress', 'writer', 'common') {
do_link ($src, $dest, "pagein-$c", "pagein-$c");