summaryrefslogtreecommitdiff
path: root/win32/list_static_libs.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-01-26 22:49:19 +0000
committerNicholas Clark <nick@ccl4.org>2009-01-26 22:49:19 +0000
commitc6d234b82f2f6387f4a8ddb73277519b5bca93fc (patch)
tree7c40eb9ab0f179609a172a224ee2f76b77ee516a /win32/list_static_libs.pl
parent4497a157d1131e07b218838ce27e77bd3ed118d0 (diff)
downloadperl-c6d234b82f2f6387f4a8ddb73277519b5bca93fc.tar.gz
Break the --create-perllibst-h and --list-static-libs options out of buildext.pl
into separate scripts.
Diffstat (limited to 'win32/list_static_libs.pl')
-rw-r--r--win32/list_static_libs.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/win32/list_static_libs.pl b/win32/list_static_libs.pl
new file mode 100644
index 0000000000..4b63d90812
--- /dev/null
+++ b/win32/list_static_libs.pl
@@ -0,0 +1,17 @@
+#!perl -w
+use strict;
+
+# prints libraries for static linking and exits
+
+use Config;
+
+my @statics = split /\s+/, $Config{static_ext};
+
+my %extralibs;
+for (@statics) {
+ my $file = "..\\lib\\auto\\$_\\extralibs.ld";
+ open my $fh, '<', $file or die "can't open $file for reading: $!";
+ $extralibs{$_}++ for grep {/\S/} split /\s+/, join '', <$fh>;
+}
+print map {s|/|\\|g;m|([^\\]+)$|;"..\\lib\\auto\\$_\\$1$Config{_a} "} @statics;
+print map {"$_ "} sort keys %extralibs;