1# Makefile.PL -- Makefile template for PodParser. 2# 3# This file is part of "PodParser". PodParser is free software; 4# you can redistribute it and/or modify it under the same terms 5# as Perl itself. 6 7BEGIN { 8 require 5.005; 9 if(!eval { require File::Spec; 1; } || $@) { 10 warn "Warning: prerequisite File::Spec 0.82 not found.\n". 11 "It is required to run this $0\n"; 12 exit 0; 13 } 14 my $FSversion = $File::Spec::VERSION || 0; 15 if($FSversion < 0.82) { 16 warn "Warning: prerequisite File::Spec 0.82 not found. We have $FSversion.\n". 17 "It is required to run this $0\n"; 18 exit 0; 19 } 20} 21 22use ExtUtils::MakeMaker; 23 24$DISTNAME = "Pod-Parser"; ## The "product" name for this distribution 25$DISTMOD = 'Pod::Parser'; ## The "title" module of this distribution 26@MODULES = ( $DISTMOD, ## Other modules in this distribution 27 qw( Pod::InputObjects 28 Pod::PlainText 29 Pod::Select 30 ) 31 ); 32 33## The executable scripts to be installed 34@SCRIPTS = qw( podselect 35 ); 36sub script($) { File::Spec->catfile ('scripts', @_) } 37my @EXE_FILES = (); 38if ( $^O eq 'VMS' ) { 39 @EXE_FILES = map { script "$_.com" } @SCRIPTS; 40} 41else { 42 @EXE_FILES = map { script $_ } @SCRIPTS; 43} 44 45## The test-script to execute regression tests (note that the 46## 'xtra' directory might not exist for some installations) 47@TESTPODS = (); 48my $testdir = File::Spec->catfile('t', 'pod'); 49my $test2dir = File::Spec->catfile($testdir, 'xtra'); 50my @testdirs = ($testdir); 51push @testdirs, $test2dir if (-d $test2dir); 52@TESTPODS = map { File::Spec->catfile($_, '*.t') } @testdirs; 53@TESTPODS = map { glob } @TESTPODS if $^O eq 'MSWin32'; 54 55##----------------------------------------------------------------------- 56## Instructions to write the Makefile (see Ext::MakeMaker) 57 58# needed for new pod2usage2.t 59my %prereq = ( 60 'Test::More' => 0.60, 61 'Cwd' => 0, 62 'File::Basename' => 0 63); 64if ($] < 5.005) { 65 ## Need File::Spec if this is 5.004 or earlier 66 $prereq{'File::Spec'} = 0.82; 67} 68 69WriteMakefile( 70 NAME => $DISTMOD, 71 DISTNAME => $DISTNAME, 72 VERSION => '1.63', 73 INSTALLDIRS => ($] >= 5.006 ? 'perl' : 'site'), 74 PL_FILES => { map { (script("$_.PL") => script($_)) } @SCRIPTS }, 75 EXE_FILES => [ @EXE_FILES ], 76 dist => { COMPRESS => 'gzip', SUFFIX => 'gz' }, 77 clean => { FILES => "@EXE_FILES" }, 78 test => { TESTS => "@TESTPODS" }, 79 PREREQ_PM => \%prereq, 80 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 81 (ABSTRACT => 'Modules for parsing/translating POD format documents', 82 AUTHOR => 'Brad Appleton <bradapp@enteract.com>, Marek Rouchal <marekr@cpan.org>' ) : ()), 83); 84 85