summaryrefslogtreecommitdiff
path: root/win32/FindExt.pm
diff options
context:
space:
mode:
authorVadim Konovalov <vkonovalov@lucent.com>2007-08-31 10:56:47 +0200
committerSteve Hay <SteveHay@planit.com>2007-09-03 11:04:04 +0000
commita1f2e7199166cd131cf3ae57c774868eaa6d61aa (patch)
tree5a68c74ad855baa66d3c10e4375fd99ed34bee47 /win32/FindExt.pm
parenta4edf47d48bc97e4faed7a02d615d5e49723b48a (diff)
downloadperl-a1f2e7199166cd131cf3ae57c774868eaa6d61aa.tar.gz
Add Win32 makefile option to link all extensions statically
Subject: [PATCH-at31768] RE: [PATCH at 31761] RE: MakeMaker + static misbehaviour From: "Konovalov, Vadim Vladimirovich (Vadim)** CTR **" <vkonovalov@alcatel-lucent.com> Message-ID: <D16F05D0CAAA234BA2B753B80DE6100D448945@DEEXC1U02.de.lucent.com> (with a couple of tweaks to comments in Makefile, exclusion of one more module (Hash/Utils) from the "all static" build option, plus the same changes in makefile.mk) p4raw-id: //depot/perl@31784
Diffstat (limited to 'win32/FindExt.pm')
-rw-r--r--win32/FindExt.pm14
1 files changed, 10 insertions, 4 deletions
diff --git a/win32/FindExt.pm b/win32/FindExt.pm
index 298b44f9f1..b2386b1501 100644
--- a/win32/FindExt.pm
+++ b/win32/FindExt.pm
@@ -1,6 +1,6 @@
package FindExt;
-our $VERSION = '1.01';
+our $VERSION = '1.02';
use strict;
use warnings;
@@ -20,12 +20,18 @@ sub getcwd {
return $ENV{'PWD'} = $_;
}
-sub set_static_extensions
-{
+sub set_static_extensions {
# adjust results of scan_ext, and also save
# statics in case scan_ext hasn't been called yet.
+ # if '*' is passed then all XS extensions are static
+ # (with possible exclusions)
%static = ();
- for (@_) {
+ my @list = @_;
+ if ($_[0] eq '*') {
+ my %excl = map {$_=>1} map {m/^!(.*)$/} @_[1 .. $#_];
+ @list = grep {!exists $excl{$_}} keys %ext;
+ }
+ for (@list) {
$static{$_} = 1;
$ext{$_} = 'static' if $ext{$_} && $ext{$_} eq 'dynamic';
}