diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2010-11-09 14:49:47 +0100 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2010-11-09 14:49:47 +0100 |
commit | 994df59d8bb739e3534dcb84ab6460c3facd0831 (patch) | |
tree | 81d78b5e682c0ce41002aadbe1df4ca25a728b9e | |
parent | 3e72d35ab697e06f2fa52da6e3c7864fc5be2d9b (diff) | |
parent | 31098e06d089cd586a23a1e86df21fb9df9837d6 (diff) |
#i10000# changes from OOO330 m14ooo/DEV300_m96ooo/DEV300_m95ooo/DEV300_m94ooo/DEV300_m93
-rwxr-xr-x[-rw-r--r--] | odk/configure.pl | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/odk/configure.pl b/odk/configure.pl index 8f3778e8..a437ac0a 100644..100755 --- a/odk/configure.pl +++ b/odk/configure.pl @@ -5,6 +5,7 @@ # use IO::File; +use File::Basename; $main::hostname= $ARGV[0]; $main::sdkpath= $ARGV[1]; @@ -35,7 +36,7 @@ if ( $main::operatingSystem =~ m/darwin/ ) { # $main::OO_SDK_URE_HOME = `cd $main::sdkpath/../ure-link && pwd`; } else { - $main::OO_SDK_URE_HOME = `cd $main::sdkpath/../../ure && pwd`; + $main::OO_SDK_URE_HOME = `cd $main::sdkpath/../ure-link && pwd`; } chomp($main::OO_SDK_URE_HOME); @@ -554,15 +555,26 @@ sub resolveLink { my $base= shift; my $link= shift; - my $linktarget = readlink "$base/$link"; + + my $resolvedpath = "$base/$link"; + my $linktarget = readlink "$resolvedpath"; my $resolvedlink = ""; while ( $linktarget ne "") { - $link = $linktarget; - $linktarget = readlink "$base/$link"; + + if ( $linktarget =~ m/^\/.*/ ) + { + $resolvedpath = "$linktarget"; + } else { + $resolvedpath = `cd $base/$linktarget; pwd`; + chop $resolvedpath; } + $base = dirname("$resolvedpath"); - $resolvedlink = `cd $base/$link; pwd`; + $linktarget = readlink "$resolvedpath"; + } + + $resolvedlink = `cd $resolvedpath; pwd`; chop $resolvedlink; return $resolvedlink; } @@ -578,6 +590,7 @@ sub searchprog { if ( $main::operatingSystem =~ m/darwin/ ) { $progDir = resolveLink("/System/Library/Frameworks/JavaVM.Framework/Versions", "CurrentJDK"); + if ( -e "$progDir/$main::OO_SDK_JAVA_BIN_DIR/javac" ) { return "$progDir/$main::OO_SDK_JAVA_BIN_DIR"; |