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.pl13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/win-ldd.pl b/scripts/win-ldd.pl
index 6907016bb..8a25c3434 100644
--- a/scripts/win-ldd.pl
+++ b/scripts/win-ldd.pl
@@ -3,6 +3,7 @@ use strict;
my %deploy;
my $objdump = $ENV{objdump} ? $ENV{objdump} : "objdump";
my @searchdirs;
+my @systemdirs = (qr|^c:/windows|i, qr|^c:/winnt|i, qr|/c/windows|i, qr|/c/winnt|);
sub addDependenciesFor($) {
open OBJDUMP, "-|", $objdump, "-p", $_[0] or die;
@@ -59,6 +60,18 @@ for (@ARGV) {
# Append PATH to @searchdirs
@searchdirs = (@searchdirs, split(/:/, $ENV{PATH}));
+# Remove system dirs from @searchdirs
+@searchdirs = grep {
+ my $sys = 0;
+ for my $rx (@systemdirs) {
+ if ($_ =~ $rx) {
+ $sys = 1;
+ last;
+ }
+ }
+ !$sys;
+} @searchdirs;
+
while (1) {
findMissingDependencies();