Blame Makefile.PL

Packit 6105b7
# Makefile.PL -- Makefile template for Pod-Checker
Packit 6105b7
#
Packit 6105b7
# This file is part of "Pod-Checker". Pod-Checker is free software;
Packit 6105b7
# you can redistribute it and/or modify it under the same terms
Packit 6105b7
# as Perl itself.
Packit 6105b7
Packit 6105b7
use 5.008;
Packit 6105b7
use ExtUtils::MakeMaker;
Packit 6105b7
use File::Spec;
Packit 6105b7
Packit 6105b7
$DISTNAME  = "Pod-Checker";    ## The "product" name for this distribution
Packit 6105b7
$DISTMOD   = 'Pod::Checker';  ## The "title" module of this distribution
Packit 6105b7
@MODULES   = ( $DISTMOD,     ## Other modules in this distribution
Packit 6105b7
               qw()
Packit 6105b7
             );
Packit 6105b7
Packit 6105b7
## The executable scripts to be installed
Packit 6105b7
@SCRIPTS   = qw( podchecker );
Packit 6105b7
sub script($) { File::Spec->catfile ('scripts', @_) }
Packit 6105b7
my @EXE_FILES = ();
Packit 6105b7
if ( $^O eq 'VMS' ) {
Packit 6105b7
  @EXE_FILES = map { script "$_.com" } @SCRIPTS;
Packit 6105b7
}
Packit 6105b7
else {
Packit 6105b7
  @EXE_FILES = map { script $_ } @SCRIPTS;
Packit 6105b7
}
Packit 6105b7
Packit 6105b7
## The test-script to execute regression tests (note that the
Packit 6105b7
## 'xtra' directory might not exist for some installations)
Packit 6105b7
@TESTPODS = ();
Packit 6105b7
my $testdir  = File::Spec->catfile('t', 'pod');
Packit 6105b7
my $test2dir = File::Spec->catfile($testdir, 'xtra');
Packit 6105b7
my @testdirs = ($testdir);
Packit 6105b7
push @testdirs, $test2dir if (-d $test2dir);
Packit 6105b7
@TESTPODS = map { File::Spec->catfile($_, '*.t') } @testdirs;
Packit 6105b7
@TESTPODS = map { glob } @TESTPODS if $^O eq 'MSWin32';
Packit 6105b7
Packit 6105b7
##-----------------------------------------------------------------------
Packit 6105b7
## Instructions to write the Makefile (see Ext::MakeMaker)
Packit 6105b7
Packit 6105b7
# needed for new pod2usage2.t
Packit 6105b7
my %prereq = (
Packit 6105b7
  'Pod::Simple'    => 3.28,
Packit 6105b7
  'Test::More'     => 0.60,
Packit 6105b7
  'Cwd'            => 0,
Packit 6105b7
  'File::Basename' => 0
Packit 6105b7
);
Packit 6105b7
if ($] < 5.005) {
Packit 6105b7
  ## Need File::Spec if this is 5.004 or earlier
Packit 6105b7
  $prereq{'File::Spec'} = 0.82;
Packit 6105b7
}
Packit 6105b7
Packit 6105b7
WriteMakefile(
Packit 6105b7
    NAME         => $DISTMOD,
Packit 6105b7
    DISTNAME     => $DISTNAME,
Packit 6105b7
    VERSION      => '1.73',
Packit 6105b7
    INSTALLDIRS  => ($] >= 5.006 ? 'perl' : 'site'),
Packit 6105b7
    PL_FILES     => { map { (script("$_.PL") => script($_)) } @SCRIPTS },
Packit 6105b7
    EXE_FILES    => [ @EXE_FILES ],
Packit 6105b7
    dist         => { COMPRESS => 'gzip', SUFFIX => 'gz' },
Packit 6105b7
    clean        => { FILES => "@EXE_FILES" },
Packit 6105b7
    test         => { TESTS => "@TESTPODS" },
Packit 6105b7
    macro        => { TARFLAGS   => "--format=ustar -c -v -f", },
Packit 6105b7
    PREREQ_PM    => \%prereq,
Packit 6105b7
    ($] >= 5.005 ?    ## Add these new keywords supported since 5.005
Packit 6105b7
       (ABSTRACT   => 'Pod::Checker verifies POD documentation contents for compliance with the POD format specifications',
Packit 6105b7
        AUTHOR     => 'Marek Rouchal <marekr@cpan.org>' ) : ()),
Packit 6105b7
);
Packit 6105b7