use File::Basename;
use vars qw(@ISA $VERSION);
-$VERSION = '2.04_01';
+$VERSION = '2.05';
require ExtUtils::MM_Win32;
@ISA = qw(ExtUtils::MM_Win32);
push @m, "BOOT_SYMBOL = $self->{'BOOT_SYMBOL'}\n";
# If the final binary name is greater than 8 chars,
- # truncate it here and rename it after creation
- # otherwise, Watcom Linker fails
+ # truncate it here.
if(length($self->{'BASEEXT'}) > 8) {
$self->{'NLM_SHORT_NAME'} = substr($self->{'BASEEXT'},0,8);
push @m, "NLM_SHORT_NAME = $self->{'NLM_SHORT_NAME'}\n";
MAKE_FRAG
}
- $m .= ' $(LD) $(LDFLAGS) $(OBJECT:.obj=.obj) -desc "Perl 5.7.3 Extension ($(BASEEXT)) XS_VERSION: $(XS_VERSION)" -nlmversion $(NLM_VERSION)';
+ # Reconstruct the X.Y.Z version.
+ my $version = join '.', map { sprintf "%d", $_ }
+ $] =~ /(\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. If we create in auto\lib
- # in the first place, we can't rename afterwards.
+ # current dir, rename and move to auto\lib.
$m .= q{ -o $(NLM_SHORT_NAME).$(DLEXT)}
} else {
$m .= q{ -o $(INST_AUTODIR)\\$(BASEEXT).$(DLEXT)}
$m .= q{ $(PERL_INC)\Main.lib -commandfile $(BASEEXT).def}."\n";
- # If it is having a short name, rename it
if($self->{NLM_SHORT_NAME}) {
$m .= <<'MAKE_FRAG';
- if exist $(INST_AUTODIR)\$(BASEEXT).$(DLEXT) del $(INST_AUTODIR)\$(BASEEXT).$(DLEXT)
- rename $(NLM_SHORT_NAME).$(DLEXT) $(BASEEXT).$(DLEXT)
- move $(BASEEXT).$(DLEXT) $(INST_AUTODIR)
+ if exist $(INST_AUTODIR)\$(NLM_SHORT_NAME).$(DLEXT) del $(INST_AUTODIR)\$(NLM_SHORT_NAME).$(DLEXT)
+ move $(NLM_SHORT_NAME).$(DLEXT) $(INST_AUTODIR)
MAKE_FRAG
}