diff options
author | Vadim Konovalov <vkonovalov@lucent.com> | 2007-08-31 10:56:47 +0200 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2007-09-03 11:04:04 +0000 |
commit | a1f2e7199166cd131cf3ae57c774868eaa6d61aa (patch) | |
tree | 5a68c74ad855baa66d3c10e4375fd99ed34bee47 /win32/buildext.pl | |
parent | a4edf47d48bc97e4faed7a02d615d5e49723b48a (diff) | |
download | perl-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/buildext.pl')
-rw-r--r-- | win32/buildext.pl | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/win32/buildext.pl b/win32/buildext.pl index 7578669d27..ea5f57f369 100644 --- a/win32/buildext.pl +++ b/win32/buildext.pl @@ -63,8 +63,7 @@ if ($opts{'list-static-libs'} || $opts{'create-perllibst-h'}) { print $fh "#ifdef STATIC2\n",(map {" EXTERN_C void boot_$_ (pTHX_ CV* cv);\n"} @statics1),"#undef STATIC2\n#endif\n"; print $fh "#ifdef STATIC3\n",(map {" newXS(\"$statics2[$_]::bootstrap\", boot_$statics1[$_], file);\n"} 0 .. $#statics),"#undef STATIC3\n#endif\n"; close $fh; - } - else { + } else { my %extralibs; for (@statics) { open my $fh, "<..\\lib\\auto\\$_\\extralibs.ld" or die "can't open <..\\lib\\auto\\$_\\extralibs.ld: $!"; @@ -76,17 +75,14 @@ if ($opts{'list-static-libs'} || $opts{'create-perllibst-h'}) { exit(0); } -my $here = getcwd(); +(my $here = getcwd()) =~ s{/}{\\}g; my $perl = $^X; -$here =~ s,/,\\,g; -if ($perl =~ m#^\.\.#) - { - $perl = "$here\\$perl"; - } +if ($perl =~ m#^\.\.#) { + $perl = "$here\\$perl"; +} (my $topdir = $perl) =~ s/\\[^\\]+$//; # miniperl needs to find perlglob and pl2bat $ENV{PATH} = "$topdir;$topdir\\win32\\bin;$ENV{PATH}"; -#print "PATH=$ENV{PATH}\n"; my $pl2bat = "$topdir\\win32\\bin\\pl2bat"; unless (-f "$pl2bat.bat") { my @args = ($perl, ("$pl2bat.pl") x 2); @@ -100,7 +96,7 @@ my $dmod = -M $dep; my $dir = shift; chdir($dir) || die "Cannot cd to $dir\n"; my $targ = shift; -(my $ext = getcwd()) =~ s,/,\\,g; +(my $ext = getcwd()) =~ s{/}{\\}g; my $code; FindExt::scan_ext($ext); FindExt::set_static_extensions(split ' ', $Config{static_ext}) if $ext ne "ext"; |