summaryrefslogtreecommitdiffstats
path: root/scripts/win-ldd.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/win-ldd.pl')
-rw-r--r--scripts/win-ldd.pl10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/win-ldd.pl b/scripts/win-ldd.pl
index 4144d792d..6907016bb 100644
--- a/scripts/win-ldd.pl
+++ b/scripts/win-ldd.pl
@@ -2,7 +2,7 @@
use strict;
my %deploy;
my $objdump = $ENV{objdump} ? $ENV{objdump} : "objdump";
-my @searchdirs = split(/:/, $ENV{PATH});
+my @searchdirs;
sub addDependenciesFor($) {
open OBJDUMP, "-|", $objdump, "-p", $_[0] or die;
@@ -46,11 +46,19 @@ for (@ARGV) {
if (-d $_) {
push @searchdirs, $_;
} elsif (-f $_) {
+ # Add $_'s path to the search list too
+ my $dirname = $_;
+ $dirname =~ s,/[^/]+$,,;
+ push @searchdirs, $dirname;
+
$deploy{$_} = $_;
addDependenciesFor($_);
}
}
+# Append PATH to @searchdirs
+@searchdirs = (@searchdirs, split(/:/, $ENV{PATH}));
+
while (1) {
findMissingDependencies();