summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-09-18 10:59:11 +0100
committerNicholas Clark <nick@ccl4.org>2009-09-18 10:59:11 +0100
commitc440907b5d816077e5dcc75bb0275152e9957afc (patch)
treec4c453ef0a14b96599efc84af98bcea4b1301dfe /ext
parent6c8b0117f5a408f4d2467d5263133611dc283198 (diff)
downloadperl-c440907b5d816077e5dcc75bb0275152e9957afc.tar.gz
Split XSLoader out from ext/DynaLoader into its own directory.
Diffstat (limited to 'ext')
-rw-r--r--ext/DynaLoader/Makefile.PL9
-rw-r--r--ext/XSLoader/Makefile.PL72
-rw-r--r--ext/XSLoader/XSLoader_pm.PL (renamed from ext/DynaLoader/XSLoader_pm.PL)0
-rw-r--r--ext/XSLoader/t/XSLoader.t (renamed from ext/DynaLoader/t/XSLoader.t)0
4 files changed, 75 insertions, 6 deletions
diff --git a/ext/DynaLoader/Makefile.PL b/ext/DynaLoader/Makefile.PL
index d3670a8e82..779523f203 100644
--- a/ext/DynaLoader/Makefile.PL
+++ b/ext/DynaLoader/Makefile.PL
@@ -12,13 +12,10 @@ WriteMakefile(
SKIP => [qw(dynamic dynamic_lib dynamic_bs)],
XSPROTOARG => '-noprototypes', # XXX remove later?
VERSION_FROM => 'DynaLoader_pm.PL',
- PL_FILES => {'DynaLoader_pm.PL'=>'DynaLoader.pm',
- 'XSLoader_pm.PL'=>'XSLoader.pm'},
- PM => {'DynaLoader.pm' => '$(INST_LIBDIR)/DynaLoader.pm',
- 'XSLoader.pm' => '$(INST_LIBDIR)/XSLoader.pm'},
+ PL_FILES => {'DynaLoader_pm.PL'=>'DynaLoader.pm'},
+ PM => {'DynaLoader.pm' => '$(INST_LIBDIR)/DynaLoader.pm'},
depend => {'DynaLoader$(OBJ_EXT)' => 'dlutils.c'},
- clean => {FILES => 'DynaLoader.c DynaLoader.xs DynaLoader.pm ' .
- 'XSLoader.pm'},
+ clean => {FILES => 'DynaLoader.c DynaLoader.xs DynaLoader.pm'},
);
sub MY::postamble {
diff --git a/ext/XSLoader/Makefile.PL b/ext/XSLoader/Makefile.PL
new file mode 100644
index 0000000000..0383532e15
--- /dev/null
+++ b/ext/XSLoader/Makefile.PL
@@ -0,0 +1,72 @@
+# A template for Makefile.PL.
+# - Set the $PACKAGE variable to the name of your module.
+# - Set $LAST_API_CHANGE to reflect the last version you changed the API
+# of your module.
+# - Fill in your dependencies in PREREQ_PM
+# Alternatively, you can say the hell with this and use h2xs.
+
+use ExtUtils::MakeMaker;
+eval 'use ExtUtils::MakeMaker::Coverage';
+
+$PACKAGE = 'XSLoader';
+($PACKAGE_FILE = $PACKAGE) =~ s|::|/|g;
+$LAST_API_CHANGE = 0;
+
+eval "require $PACKAGE";
+
+unless ($@) { # Make sure we did find the module.
+ print <<"CHANGE_WARN" if ${$PACKAGE.'::VERSION'} < $LAST_API_CHANGE;
+
+NOTE: There have been API changes between this version and any older
+than version $LAST_API_CHANGE! Please read the Changes file if you
+are upgrading from a version older than $LAST_API_CHANGE.
+
+CHANGE_WARN
+}
+
+# In case the empty lib/ directory was not created.
+mkdir 'lib', 0755 unless $ENV{PERL_CORE};
+
+WriteMakefile(
+ NAME => $PACKAGE,
+ LICENSE => 'perl',
+ AUTHOR => 'Sebastien Aperghis-Tramoni <sebastien@aperghis.net>',
+ VERSION_FROM => 'XSLoader_pm.PL',
+ ABSTRACT_FROM => 'XSLoader_pm.PL',
+ INSTALLDIRS => 'perl',
+ PL_FILES => { 'XSLoader_pm.PL' => 'XSLoader.pm' },
+ PM => { 'XSLoader.pm' => '$(INST_ARCHLIB)/XSLoader.pm' },
+ PREREQ_PM => {
+ 'Test::More' => '0.62',
+ },
+ dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+ clean => { FILES => 'XSLoader-*' },
+);
+
+# Unlink the .pm file included with the distribution
+1 while unlink "XSLoader.pm";
+
+{
+ package MY;
+
+ sub test_via_harness {
+ my($self, $orig_perl, $tests) = @_;
+
+ my @perls = ($orig_perl);
+ push @perls, qw(bleadperl
+ perl5.6.1
+ perl5.6.0
+ perl5.005_03
+ perl5.004_05
+ perl5.004_04
+ perl5.004)
+ if $ENV{PERL_TEST_ALL};
+
+ my $out;
+ foreach my $perl (@perls) {
+ $out .= $self->SUPER::test_via_harness($perl, $tests);
+ }
+
+ return $out;
+ }
+}
diff --git a/ext/DynaLoader/XSLoader_pm.PL b/ext/XSLoader/XSLoader_pm.PL
index a258f6ea51..a258f6ea51 100644
--- a/ext/DynaLoader/XSLoader_pm.PL
+++ b/ext/XSLoader/XSLoader_pm.PL
diff --git a/ext/DynaLoader/t/XSLoader.t b/ext/XSLoader/t/XSLoader.t
index 038986ed4b..038986ed4b 100644
--- a/ext/DynaLoader/t/XSLoader.t
+++ b/ext/XSLoader/t/XSLoader.t