use ExtUtils::MakeMaker qw($Verbose neatvalue);
-# $VERSION needs to stay numeric to avoid test warnings
-$VERSION = '1.5003';
+$VERSION = '1.51_02';
require ExtUtils::MM_Any;
@ISA = qw(ExtUtils::MM_Any);
# Print out the new #! line (or equivalent).
local $\;
- undef $/;
+ local $/;
print FIXOUT $shb, <FIXIN>;
close FIXIN;
close FIXOUT;
# Set up names of manual pages to generate from pods
foreach my $man (qw(MAN1 MAN3)) {
- unless ($self->{"${man}PODS"}) {
- $self->{"${man}PODS"} = {};
- unless ($self->{"INSTALL${man}DIR"} =~ /^(none|\s*)$/) {
- my $init = "init_${man}PODS";
- $self->$init();
- }
+ if ( $self->{"${man}PODS"}
+ or $self->{"INSTALL${man}DIR"} =~ /^(none|\s*)$/
+ ) {
+ $self->{"${man}PODS"} ||= {};
+ }
+ else {
+ my $init_method = "init_${man}PODS";
+ $self->$init_method();
}
}
}
sub init_PM {
my $self = shift;
- my $pm = $self->{PM};
-
# Some larger extensions often wish to install a number of *.pm/pl
# files into the library in various locations.
@{$self->{PMLIBPARENTDIRS}} = ('lib');
}
+ return if $self->{PM} and $self->{ARGS}{PM};
+
if (@{$self->{PMLIBDIRS}}){
print "Searching PMLIBDIRS: @{$self->{PMLIBDIRS}}\n"
if ($Verbose >= 2);
$inst = $self->libscan($inst);
print "libscan($path) => '$inst'\n" if ($Verbose >= 2);
return unless $inst;
- $pm->{$path} = $inst;
+ $self->{PM}{$path} = $inst;
}, @{$self->{PMLIBDIRS}});
}
}
MAP_LIBPERL "$(MAP_LIBPERL)" \
>> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
-};
+} if -f 'Makefile.PL';
push @m, q{
inst_perl: pure_inst_perl doc_inst_perl
}
- $ppd_xml .= sprintf <<'PPD_OUT', $Config{archname};
+ my $archname = $Config{archname};
+ if ($] >= 5.008) {
+ # archname did not change from 5.6 to 5.8, but those versions may
+ # not be not binary compatible so now we append the part of the
+ # version that changes when binary compatibility may change
+ $archname .= "-". substr($Config{version},0,3);
+ }
+ $ppd_xml .= sprintf <<'PPD_OUT', $archname;
<OS NAME="$(OSNAME)" />
<ARCHITECTURE NAME="%s" />
PPD_OUT
}
# note: 'test.pl' name is also hardcoded in init_dirscan()
my(@m);
+ my $subdirs_test = ($self->{DIR} && @{$self->{DIR}} ? 'subdirs-test' : '');
push(@m,"
TEST_VERBOSE=0
TEST_TYPE=test_\$(LINKTYPE)
testdb :: testdb_\$(LINKTYPE)
-test :: \$(TEST_TYPE)
+test :: \$(TEST_TYPE) $subdirs_test
");
foreach my $dir (@{ $self->{DIR} }) {
my $test = $self->oneliner(sprintf <<'CODE', $dir);
chdir '%s';
-system '$(MAKE) test $(PASTHRU)'
+system '$(MAKE) $(USEMAKEFILE) $(FIRST_MAKEFILE) test $(PASTHRU)'
if -f '$(FIRST_MAKEFILE)';
CODE
- push(@m, "\t\$(NOECHO) $test\n");
+ push(@m, "\nsubdirs-test ::\n\t\$(NOECHO) $test\n");
}
push(@m, "\t\$(NOECHO) \$(ECHO) 'No tests defined for \$(NAME) extension.'\n")