This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add sv_unmagicext
[perl5.git] / dist / XSLoader / Makefile.PL
CommitLineData
c440907b
NC
1# A template for Makefile.PL.
2# - Set the $PACKAGE variable to the name of your module.
3# - Set $LAST_API_CHANGE to reflect the last version you changed the API
4# of your module.
5# - Fill in your dependencies in PREREQ_PM
6# Alternatively, you can say the hell with this and use h2xs.
7
8use ExtUtils::MakeMaker;
9eval 'use ExtUtils::MakeMaker::Coverage';
10
11$PACKAGE = 'XSLoader';
12($PACKAGE_FILE = $PACKAGE) =~ s|::|/|g;
13$LAST_API_CHANGE = 0;
14
15eval "require $PACKAGE";
16
17unless ($@) { # Make sure we did find the module.
18 print <<"CHANGE_WARN" if ${$PACKAGE.'::VERSION'} < $LAST_API_CHANGE;
19
20NOTE: There have been API changes between this version and any older
21than version $LAST_API_CHANGE! Please read the Changes file if you
22are upgrading from a version older than $LAST_API_CHANGE.
23
24CHANGE_WARN
25}
26
27# In case the empty lib/ directory was not created.
28mkdir 'lib', 0755 unless $ENV{PERL_CORE};
29
30WriteMakefile(
31 NAME => $PACKAGE,
32 LICENSE => 'perl',
33 AUTHOR => 'Sebastien Aperghis-Tramoni <sebastien@aperghis.net>',
34 VERSION_FROM => 'XSLoader_pm.PL',
35 ABSTRACT_FROM => 'XSLoader_pm.PL',
36 INSTALLDIRS => 'perl',
37 PL_FILES => { 'XSLoader_pm.PL' => 'XSLoader.pm' },
38 PM => { 'XSLoader.pm' => '$(INST_ARCHLIB)/XSLoader.pm' },
39 PREREQ_PM => {
40 'Test::More' => '0.62',
41 },
42 dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
95aef5ce 43 clean => { FILES => 'XSLoader-* XSLoader.pm' },
c440907b
NC
44);
45
46# Unlink the .pm file included with the distribution
471 while unlink "XSLoader.pm";
48
49{
50 package MY;
51
52 sub test_via_harness {
53 my($self, $orig_perl, $tests) = @_;
54
55 my @perls = ($orig_perl);
56 push @perls, qw(bleadperl
57 perl5.6.1
58 perl5.6.0
59 perl5.005_03
60 perl5.004_05
61 perl5.004_04
62 perl5.004)
63 if $ENV{PERL_TEST_ALL};
64
65 my $out;
66 foreach my $perl (@perls) {
67 $out .= $self->SUPER::test_via_harness($perl, $tests);
68 }
69
70 return $out;
71 }
72}