Give the test file for __builtin_expect() the correct name (try.c, not
[p5sagit/p5-mst-13.2.git] / ext / Module / Pluggable / Makefile.PL
CommitLineData
183ac38d 1# Note: this file was auto-generated by Module::Build::Compat version 0.03
848ff2a1 2use ExtUtils::MakeMaker;
183ac38d 3use FindBin;
4use File::Spec::Functions qw(catfile);
5
6# VOS and VMS can't handle dodgy plugin names
7# and VOS can't even unpack them so we create them on the
8# fly and only run the tests if they're present
9my %dodgy_files = (
10 catfile(qw(OddTest Plugin -Dodgy.pm)) => 'OddTest::Plugin::-Dodgy',
11 catfile(qw(EditorJunk Plugin #Bar.pm#)) => 'EditorJunk::Bar',
12 catfile(qw(EditorJunk Plugin .#Bar.pm)) => 'EditorJunk::Bar',
13);
14
15my $core = grep { $_ eq 'PERL_CORE=1' } @ARGV;
16my @path = $core ? (File::Spec->updir, File::Spec->updir, File::Spec->updir,
17 "t", "Module_Pluggable") : ($FindBin::Bin,"t");
18my @files;
19
20if ($^O ne 'VMS' && $^O ne 'VOS') {
21 foreach my $test (keys %dodgy_files) {
22 my ($file) = (catfile(@path, "lib", $test)=~/^(.*)$/);
23 if (open(my $fh, ">", $file)) {
24 my $name = $dodgy_files{$test};
25 print $fh "package $name;\nsub new {}\n1;";
26 close($fh);
27 push @files, $file;
28 }
29 }
30}
848ff2a1 31
32WriteMakefile
33(
34 'NAME' => 'Module::Pluggable',
35 'VERSION_FROM' => 'lib/Module/Pluggable.pm',
848ff2a1 36 'PREREQ_PM' => {
37 'File::Basename' => '0',
38 'File::Spec' => '3.00',
39 'Test::More' => '0.62'
40 },
183ac38d 41 'INSTALLDIRS' => 'site',
848ff2a1 42 'EXE_FILES' => [],
183ac38d 43 'PL_FILES' => {},
44 'realclean' => {FILES=> join ' ', @files},
45 # In the core pods will be built by installman.
46 $core ? (MAN3PODS => {}) : (),
848ff2a1 47 )
48;