summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-01-01 16:05:16 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-01-01 16:07:19 -0600
commitea5d18a1c7c5916be0f97db1ecba07db5b9cb5cd (patch)
treece72da68878e99a7c13737e6928a454c68f87c58 /solenv
parent49319b288f40ba13b24799136caa97863d523e39 (diff)
move UDP and fix linkoo to look for INPATH and UPD in config_host.mk
Diffstat (limited to 'solenv')
-rwxr-xr-xsolenv/bin/linkoo29
1 files changed, 2 insertions, 27 deletions
diff --git a/solenv/bin/linkoo b/solenv/bin/linkoo
index ade1ee70aae9..06a103d3ff8d 100755
--- a/solenv/bin/linkoo
+++ b/solenv/bin/linkoo
@@ -141,35 +141,10 @@ my @known_duplicates = ( 'db.jar', 'libi18n', 'libnssckbi', 'libnssdbm', 'libsql
sub sniff_target($)
{
my $build_dir = shift;
- my ($dirhandle, $fname);
my ($target, $libver, $lang) = ( 'unxlngi6.pro', '680', 'en-US' ); # defaults
- opendir ($dirhandle, $build_dir) || die "Can't open $build_dir";
- while ($fname = readdir ($dirhandle)) {
- if ($fname =~ /Host.sh$/) {
- my $file;
- open ($file, "$build_dir/$fname") || die "Can't open $build_dir/$fname";
- while (<$file>) {
- /\s*(\S+)\s*=\s*\"(\S+)\"/ || next;
- if ($1 eq 'UPD') {
- $libver = $2;
- }
- }
- close ($file);
- } elsif ($fname =~ /host.mk$/) {
- my $file;
- open ($file, "$build_dir/$fname") || die "Can't open $build_dir/$fname";
- while (<$file>) {
- /\s*export\s*(\S+)\s*=\s*\"(\S+)\"/ || next;
- if ($1 eq 'INPATH') {
- $target = $2;
- }
- }
- close ($file);
- }
- }
-
- closedir ($dirhandle);
+ chomp($target=`cat $build_dir/config_host.mk | grep INPATH= | sed -e 's/.*=//' | sed -e 's/"//g'`);
+ chomp($libver=`cat $build_dir/config_host.mk | grep UPD= | sed -e 's/.*=//' | sed -e 's/"//g'`);
print "Sniffed target: $target, $libver\n";