=head1 NAME
ExtUtils::MM_NW5 - methods to override UN*X behaviour in ExtUtils::MakeMaker
=head1 SYNOPSIS
use ExtUtils::MM_NW5; # Done internally by ExtUtils::MakeMaker if needed
=head1 DESCRIPTION
See ExtUtils::MM_Unix for a documentation of the methods provided
there. This package overrides the implementation of these methods, not
the semantics.
=over
=cut
use strict;
use Config;
# Has same version as blead, but differs. Must resync when next CPAN release
# of MM is merged from blead to maint
$VERSION = '2.07_02';
=item os_flavor
We're Netware in addition to being Windows.
=cut
sub os_flavor {
my $self = shift;
}
=item init_platform (o)
Add Netware macros.
LIBPTH, BASE_IMPORT, NLM_VERSION, MPKTOOL, TOOLPATH, BOOT_SYMBOL,
NLM_SHORT_NAME, INCLUDE, PATH, MM_NW5_REVISION
=item platform_constants
Add Netware macros initialized above to the Makefile.
=cut
sub init_platform {
my($self) = shift;
# To get Win32's setup.
# incpath is copied to makefile var INCLUDE in constants sub, here just
# make it empty
$libpth =~ s( )(;);
# Additional import file specified from Makefile.pl
if($self->{'base_import'}) {
}
# If the final binary name is greater than 8 chars,
# truncate it here.
}
# Get the include path and replace the spaces with ;
# Copy this to makefile as INCLUDE = d:\...;d:\;
# Set the path to CodeWarrior binaries which might not have been set in
# any other place
}
sub platform_constants {
my($self) = shift;
my $make_frag = '';
# Setup Win32's constants.
))
{
$make_frag .= "$macro = $self->{$macro}\n";
}
return $make_frag;
}
=item const_cccmd (o)
=cut
sub const_cccmd {
-DVERSION=\"$(VERSION)\" -DXS_VERSION=\"$(XS_VERSION)\"
}
=item static_lib (o)
=cut
sub static_lib {
my($self) = @_;
my $m = <<'END';
$(RM_RF) $@
END
# If this extension has it's own library (eg SDBM_File)
# then copy that to $(INST_STATIC) and add $(OBJECT) into it.
END
my $ar_arg;
if( $BORLAND ) {
$ar_arg = '$@ $(OBJECT:^"+")';
}
elsif( $GCC ) {
$ar_arg = '-ru $@ $(OBJECT)';
}
else {
$ar_arg = '-type library -o $@ $(OBJECT)';
}
$m .= sprintf <<'END', $ar_arg;
$(AR) %s
$(CHMOD) 755 $@
END
END
return $m;
}
=item dynamic_lib (o)
Defines how to produce the *.so (or equivalent) files.
=cut
sub dynamic_lib {
my($ldfrom) = '$(LDFROM)';
my $m = <<'MAKE_FRAG';
# This section creates the dynamically loadable $(INST_DYNAMIC)
# from $(OBJECT) and possibly $(MYEXTLIB).
OTHERLDFLAGS = '.$otherldflags.'
INST_DYNAMIC_DEP = '.$inst_dynamic_dep.'
# Create xdc data for an MT safe NLM in case of mpk build
$m .= <<'MAKE_FRAG';
}
# Reconstruct the X.Y.Z version.
$] =~ /(\d)\.(\d{3})(\d{2})/;
$m .= sprintf ' $(LD) $(LDFLAGS) $(OBJECT:.obj=.obj) -desc "Perl %s Extension ($(BASEEXT)) XS_VERSION: $(XS_VERSION)" -nlmversion $(NLM_VERSION)', $version;
# Taking care of long names like FileHandle, ByteLoader, SDBM_File etc
if($self->{NLM_SHORT_NAME}) {
# In case of nlms with names exceeding 8 chars, build nlm in the
# current dir, rename and move to auto\lib.
$m .= q{ -o $(NLM_SHORT_NAME).$(DLEXT)}
} else {
}
# Add additional lib files if any (SDBM_File)
if($self->{NLM_SHORT_NAME}) {
$m .= <<'MAKE_FRAG';
}
$m .= <<'MAKE_FRAG';
$(CHMOD) 755 $@
return $m;
}
1;
=back
=cut