Blame Makefile.PL

Packit 792b68
# Makefile.PL -- Makefile template for PodParser.
Packit 792b68
#
Packit 792b68
# This file is part of "PodParser". PodParser is free software;
Packit 792b68
# you can redistribute it and/or modify it under the same terms
Packit 792b68
# as Perl itself.
Packit 792b68

Packit 792b68
BEGIN {
Packit 792b68
    require 5.005;
Packit 792b68
    if(!eval { require File::Spec; 1; } || $@) {
Packit 792b68
        warn "Warning: prerequisite File::Spec 0.82 not found.\n".
Packit 792b68
             "It is required to run this $0\n";
Packit 792b68
        exit 0;
Packit 792b68
    }
Packit 792b68
    my $FSversion = $File::Spec::VERSION || 0;
Packit 792b68
    if($FSversion < 0.82) {
Packit 792b68
        warn "Warning: prerequisite File::Spec 0.82 not found. We have $FSversion.\n".
Packit 792b68
             "It is required to run this $0\n";
Packit 792b68
        exit 0;
Packit 792b68
    }
Packit 792b68
}
Packit 792b68

Packit 792b68
use ExtUtils::MakeMaker;
Packit 792b68

Packit 792b68
$DISTNAME  = "Pod-Parser";    ## The "product" name for this distribution
Packit 792b68
$DISTMOD   = 'Pod::Parser';  ## The "title" module of this distribution
Packit 792b68
@MODULES   = ( $DISTMOD,     ## Other modules in this distribution
Packit 792b68
               qw( Pod::InputObjects
Packit 792b68
                   Pod::PlainText
Packit 792b68
                   Pod::Select
Packit 792b68
                 )
Packit 792b68
             );
Packit 792b68

Packit 792b68
## The executable scripts to be installed
Packit 792b68
@SCRIPTS   = qw( podselect
Packit 792b68
               );
Packit 792b68
sub script($) { File::Spec->catfile ('scripts', @_) }
Packit 792b68
my @EXE_FILES = ();
Packit 792b68
if ( $^O eq 'VMS' ) {
Packit 792b68
  @EXE_FILES = map { script "$_.com" } @SCRIPTS;
Packit 792b68
}
Packit 792b68
else {
Packit 792b68
  @EXE_FILES = map { script $_ } @SCRIPTS;
Packit 792b68
}
Packit 792b68

Packit 792b68
## The test-script to execute regression tests (note that the
Packit 792b68
## 'xtra' directory might not exist for some installations)
Packit 792b68
@TESTPODS = ();
Packit 792b68
my $testdir  = File::Spec->catfile('t', 'pod');
Packit 792b68
my $test2dir = File::Spec->catfile($testdir, 'xtra');
Packit 792b68
my @testdirs = ($testdir);
Packit 792b68
push @testdirs, $test2dir if (-d $test2dir);
Packit 792b68
@TESTPODS = map { File::Spec->catfile($_, '*.t') } @testdirs;
Packit 792b68
@TESTPODS = map { glob } @TESTPODS if $^O eq 'MSWin32';
Packit 792b68

Packit 792b68
##-----------------------------------------------------------------------
Packit 792b68
## Instructions to write the Makefile (see Ext::MakeMaker)
Packit 792b68

Packit 792b68
# needed for new pod2usage2.t
Packit 792b68
my %prereq = (
Packit 792b68
  'Test::More'     => 0.60,
Packit 792b68
  'Cwd'            => 0,
Packit 792b68
  'File::Basename' => 0
Packit 792b68
);
Packit 792b68
if ($] < 5.005) {
Packit 792b68
  ## Need File::Spec if this is 5.004 or earlier
Packit 792b68
  $prereq{'File::Spec'} = 0.82;
Packit 792b68
}
Packit 792b68

Packit 792b68
WriteMakefile(
Packit 792b68
    NAME         => $DISTMOD,
Packit 792b68
    DISTNAME     => $DISTNAME,
Packit 792b68
    VERSION      => '1.63',
Packit 792b68
    INSTALLDIRS  => ($] >= 5.006 ? 'perl' : 'site'),
Packit 792b68
    PL_FILES     => { map { (script("$_.PL") => script($_)) } @SCRIPTS },
Packit 792b68
    EXE_FILES    => [ @EXE_FILES ],
Packit 792b68
    dist         => { COMPRESS => 'gzip', SUFFIX => 'gz' },
Packit 792b68
    clean        => { FILES => "@EXE_FILES" },
Packit 792b68
    test         => { TESTS => "@TESTPODS" },
Packit 792b68
    PREREQ_PM    => \%prereq,
Packit 792b68
    ($] >= 5.005 ?    ## Add these new keywords supported since 5.005
Packit 792b68
       (ABSTRACT   => 'Modules for parsing/translating POD format documents',
Packit 792b68
        AUTHOR     => 'Brad Appleton <bradapp@enteract.com>, Marek Rouchal <marekr@cpan.org>' ) : ()),
Packit 792b68
);
Packit 792b68