use File::Basename;
use vars qw(@ISA $VERSION);
-$VERSION = '2.02_01';
+$VERSION = '2.05';
require ExtUtils::MM_Win32;
@ISA = qw(ExtUtils::MM_Win32);
return $self->{CONST_CCCMD} = <<'MAKE_FRAG';
CCCMD = $(CC) $(CCFLAGS) $(INC) $(OPTIMIZE) \
$(PERLTYPE) $(MPOLLUTE) -o $@ \
- -DVERSION="$(VERSION)" -DXS_VERSION="$(XS_VERSION)"
+ -DVERSION=\"$(VERSION)\" -DXS_VERSION=\"$(XS_VERSION)\"
MAKE_FRAG
}
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";
# Copy this to makefile as INCLUDE = d:\...;d:\;
(my $inc = $Config{'incpath'}) =~ s/([ ]*)-I/;/g;
- # Get the additional include path and append to INCLUDE, keeping it
- # in INC will give problems during compilation, hence reset it
- # after getting the value
- $self->{INC} = '';
+ # Get the additional include path from the user through the command prompt
+ # and append to INCLUDE
+# $self->{INC} = '';
+ push @m, "INC = $self->{'INC'}\n";
push @m, qq{
INCLUDE = $inc;
# If this extension has it's own library (eg SDBM_File)
# then copy that to $(INST_STATIC) and add $(OBJECT) into it.
$m .= <<'END' if $self->{MYEXTLIB};
- $self->{CP} $(MYEXTLIB) $\@
+ $self->{CP} $(MYEXTLIB) $@
END
my $ar_arg;
END
$m .= <<'END' if $self->{PERL_SRC};
- $(NOECHO)echo "$(EXTRALIBS)" >> $(PERL_SRC)\ext.libs
-
+ $(NOECHO)echo "$(EXTRALIBS)" >> $(PERL_SRC)\ext.libs
+
+
END
-
+ $m .= $self->dir_target('$(INST_ARCHAUTODIR)');
return $m;
}
-
=item dynamic_lib (o)
Defines how to produce the *.so (or equivalent) files.
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
}