| 1 |
# This -*- cperl -*- program writes the Makefile for WWW::Search |
| 2 |
|
| 3 |
use lib '.'; |
| 4 |
|
| 5 |
use inc::Module::Install; |
| 6 |
|
| 7 |
version(2.519); |
| 8 |
all_from('lib/WWW/Search.pm'); |
| 9 |
perl_version(5.005); |
| 10 |
license('perl'); |
| 11 |
|
| 12 |
install_script('Programs/AutoSearch'); |
| 13 |
install_script('Programs/WebSearch'); |
| 14 |
|
| 15 |
# These are needed for AutoSearch: |
| 16 |
requires('Data::Dumper'); |
| 17 |
requires('Date::Manip'); |
| 18 |
recommends('Email::Send'); |
| 19 |
recommends('Email::MIME'); |
| 20 |
recommends('Email::MIME::Creator'); |
| 21 |
requires('File::Copy'); |
| 22 |
requires('Getopt::Long' => 2.24); |
| 23 |
requires('POSIX'); |
| 24 |
# These are needed for WebSearch: |
| 25 |
requires('Getopt::Long' => 2.24); |
| 26 |
# These are needed for WWW::Search base module and sub-modules: |
| 27 |
requires('CGI'); |
| 28 |
requires('File::Basename'); |
| 29 |
requires('File::Find'); |
| 30 |
requires('File::Path'); |
| 31 |
requires('File::Slurp'); |
| 32 |
requires('File::Spec'); |
| 33 |
requires('HTML::Parser' => 2.23); |
| 34 |
requires('HTML::TreeBuilder'); # HTML-Tree-0.51 is good |
| 35 |
requires('LWP::UserAgent' => 2.0); |
| 36 |
requires('LWP::MemberMixin'); |
| 37 |
requires('Net::Domain'); |
| 38 |
requires('Pod::Usage'); |
| 39 |
requires('URI'); |
| 40 |
requires('URI::Escape'); |
| 41 |
requires('User'); |
| 42 |
# These are used by WWW::Search::Test: |
| 43 |
requires('Bit::Vector'); |
| 44 |
requires('Date::Manip'); |
| 45 |
requires('File::Path'); |
| 46 |
requires('File::Slurp'); |
| 47 |
requires('File::Spec'); |
| 48 |
requires('Test::More'); |
| 49 |
# These are needed during `make test`: |
| 50 |
test_requires('File::Temp'); |
| 51 |
test_requires('IO::Capture::Stderr'); |
| 52 |
test_requires('Test::File'); |
| 53 |
test_requires('Test::More'); |
| 54 |
recommends('Test::Pod'); |
| 55 |
recommends('Test::Pod::Coverage'); |
| 56 |
# I think there's a bug in Module::CoreList or something, because this |
| 57 |
# comes up missing on some platforms: |
| 58 |
test_requires('Test::Simple'); |
| 59 |
# For the defunct test_parsing rule, we need a version that sets |
| 60 |
# FULLPERLRUNINST: |
| 61 |
test_requires('ExtUtils::MM_Unix' => 1.41); |
| 62 |
|
| 63 |
sub MY::preamble |
| 64 |
{ |
| 65 |
# This does not work because MakeMaker apparently does not have a |
| 66 |
# preamble method. |
| 67 |
return <<'PREAMBLE'; |
| 68 |
AutoSearch :: FORCE |
| 69 |
/bin/rm -f AutoSearch |
| 70 |
PREAMBLE |
| 71 |
} # MY::preamble |
| 72 |
|
| 73 |
my $ret = q{}; |
| 74 |
if (1) |
| 75 |
{ |
| 76 |
$ret .= <<'PART0'; |
| 77 |
coverage : |
| 78 |
- cover -delete |
| 79 |
$(MAKE) HARNESS_PERL_SWITCHES=-MDevel::Cover test |
| 80 |
cover |
| 81 |
PART0 |
| 82 |
} # if |
| 83 |
if (0) |
| 84 |
{ |
| 85 |
$ret .= <<'PART2'; |
| 86 |
test_parsing : pure_all |
| 87 |
$(FULLPERLRUNINST) t/test_parsing.pl $(TEST_ARGS) |
| 88 |
|
| 89 |
PART2 |
| 90 |
} # if |
| 91 |
if (1) |
| 92 |
{ |
| 93 |
$ret .= <<'PART3'; |
| 94 |
tags: |
| 95 |
cat MANIFEST | etags - |
| 96 |
|
| 97 |
PART3 |
| 98 |
} # if |
| 99 |
postamble $ret; |
| 100 |
|
| 101 |
use Env; |
| 102 |
if ($ENV{MTHURN_PERL_DEV}) |
| 103 |
{ |
| 104 |
warn "DDD This is author's development environment\n"; |
| 105 |
use_ptar(); |
| 106 |
} # if |
| 107 |
|
| 108 |
makemaker_args(NORECURS=>1); |
| 109 |
WriteAll; |
| 110 |
|
| 111 |
if (0 && $ENV{MTHURN_PERL_DEV}) |
| 112 |
{ |
| 113 |
print "DDD This is author's development environment\n"; |
| 114 |
my $sFnameMakefile = q{Makefile}; |
| 115 |
eval "use File::Slurp"; |
| 116 |
my $s = read_file($sFnameMakefile); |
| 117 |
if ($s !~ s/(DIRFILESEP\s*=\s*).+$/$1\//m) |
| 118 |
{ |
| 119 |
print " EEE did not find DIRFILESEP in Makefile\n"; |
| 120 |
} # if |
| 121 |
if ($s !~ s/(pm_to_blib\()\{\{\@ARGV\}\}/$1 . '{@ARGV}'/e) |
| 122 |
{ |
| 123 |
print " EEE did not find pm_to_blib@ARGV in Makefile\n"; |
| 124 |
} # if |
| 125 |
if ($s !~ s/(from_to\s+=>\s+)\{\{\@ARGV\}\}/$1 . '{@ARGV}'/e) |
| 126 |
{ |
| 127 |
print " EEE did not find from_to@ARGV in Makefile\n"; |
| 128 |
} # if |
| 129 |
write_file($sFnameMakefile, $s); |
| 130 |
} # if |
| 131 |
|
| 132 |
__END__ |
| 133 |
|