1N/AExtUtils::MM_Win32 - methods to override UN*X behaviour in ExtUtils::MakeMaker 1N/A use ExtUtils::MM_Win32; # Done internally by ExtUtils::MakeMaker if needed 1N/ASee ExtUtils::MM_Unix for a documentation of the methods provided 1N/Athere. This package overrides the implementation of these methods, not 1N/A=head2 Overridden methods 1N/A -e
"Mksymlists('NAME'=>\"!, $self->{NAME}, 1N/A q!\
", 'DLBASE' => '!,$self->{DLBASE}, 1N/A # The above two lines quoted differently to work around 1N/A # a bug in the 4DOS/4NT command line interpreter. The visible 1N/A # result of the bug was files named q('extension_name',) *with the 1N/A # single quotes and the comma* in the extension build directories. 1N/A=item replace_manpage_separator 1N/AChanges the path separator with . 1N/A=item B<maybe_command> 1N/ASince Windows has nothing as simple as an executable bit, we check the 1N/AThe PATHEXT env variable will be used to get a list of extensions that 1N/Amight indicate a command, otherwise .com, .exe, .bat and .cmd will be 1N/A my @e =
exists($
ENV{
'PATHEXT'})
1N/A for (@e) { $e .=
"\Q$_\E|" }
1N/A # see if file ends in one of the known extensions 1N/A return "$file$_" if -e
"$file$_";
1N/AThe Win9x shell does not expand globs and I'll play it safe and assume 1N/Aother Windows variants don't either. 1N/ASo we do it for them. 1N/A return join(
' ', <t\\*.t>);
1N/A=item B<init_DIRFILESEP> 1N/A # The ^ makes sure its not interpreted as an escape in nmake 1N/AOverride some of the Unix specific commands with portable 1N/AExtUtils::Command ones. 1N/AAlso provide defaults for LD and AR in case the %Config values aren't 1N/ALDLOADLIBS's default is changed to $Config{libs}. 1N/AAdjustments are made for Borland's quirks needing -L to come first. 1N/A # Used in favor of echo because echo won't strip quotes. :( 1N/A $
self->{
TOUCH} ||=
'$(PERLRUN) -MExtUtils::Command -e touch';
1N/A $
self->{
CHMOD} ||=
'$(PERLRUN) -MExtUtils::Command -e chmod';
1N/A $
self->{
CP} ||=
'$(PERLRUN) -MExtUtils::Command -e cp';
1N/A $
self->{
RM_F} ||=
'$(PERLRUN) -MExtUtils::Command -e rm_f';
1N/A $
self->{
RM_RF} ||=
'$(PERLRUN) -MExtUtils::Command -e rm_rf';
1N/A $
self->{
MV} ||=
'$(PERLRUN) -MExtUtils::Command -e mv';
1N/A # Setting SHELL from $Config{sh} can break dmake. Its ok without it. 1N/A # -Lfoo must come first for Borland, so we put it in LDDLFLAGS 1N/A while ($
libs =~ s/(?:^|\s)((
"?)-L.+?\2)(?:\s|$)/ /) { 1N/A=item init_platform (o) 1N/AAdd MM_Win32_VERSION. 1N/A=item platform_constants (o) 1N/A=item special_targets (o) 1N/AAdd .USESHELL target for dmake. 1N/AChanges how to run the linker. 1N/AThe rest is duplicate code from MM_Unix. Should move the linker code 1N/A # If this extension has its own library (eg SDBM_File) 1N/A # then copy that to $(INST_STATIC) and add $(OBJECT) into it. 1N/A :
'-out:$@ $(OBJECT)')).q{
1N/A # Old mechanism - still available: 1N/A=item dynamic_lib (o) 1N/AComplicated stuff for Win32 that I don't understand. :( 1N/A# we try to overcome non-relocateable-DLL problems by generating 1N/A# a (hopefully unique) image-base from the dll's name 1N/A# This section creates the dynamically loadable $(INST_DYNAMIC) 1N/A# from $(OBJECT) and possibly $(MYEXTLIB). 1N/AClean out some extra dll.{base,exp} files which might be generated by 1N/Agcc. Otherwise, take out all *.pdb files. 1N/AChecks for the perl program under several common perl extensions. 1N/A return "$file.bat" if -r
"$file.bat" && -f _;
1N/AThis target is stubbed out. Not sure why. 1N/AAll we send is -nologo to nmake to prevent it from printing its damned 1N/A return "PASTHRU = " . ($
NMAKE ?
"-nologo" :
"");
1N/AThese are based on what command.com does on Win98. They may be wrong 1N/Afor other Windows shells, I don't know. 1N/A # Strip leading and trailing newlines 1N/A # I don't know if this is correct, but it seems to work on 1N/A # Win98's command.com 1N/A # dmake eats '{' inside double quotes and leaves alone { outside double 1N/A # quotes; however it transforms {{ into { either inside and outside double 1N/A # quotes. It also translates }} into }. The escaping below is not 1N/Anmake 1.50 limits command length to 2048 characters.