1
2use ExtUtils::MakeMaker;
3use Config;
4
5my $pkg = 'URBL::Prepare';
6$pkg =~ /([^:]+)$/;
7my $module = $1 .'.pm';
8
9# See lib/ExtUtils/MakeMaker.pm for details of how to influence
10# the contents of the Makefile that is written.
11
12my %makeparms = (
13    NAME		=> $pkg,
14    VERSION_FROM	=> $module, # finds $VERSION
15#    PREREQ_PM		=> {
16#    },
17    clean		=> { FILES    => "*~ tmp* __*" },
18    dist		=> {COMPRESS=>'gzip', SUFFIX=>'gz'}
19);
20
21# if html conversion has been removed in this perl version then work around here
22#
23
24sub MY::top_targets {
25  package MY;
26  my $inherited = shift->SUPER::top_targets(@_);
27  $inherited =~ s/(pure_all\s+::.+)/$1 README/;
28  $inherited;
29}
30
31sub MY::post_constants {
32  my $post_constants = $Config{scriptdirexp} .'/pod2text';
33  if (-e $post_constants) {
34    $post_constants = q|
35MY_POD2TEXT = |. $post_constants .q|
36|;
37  } else {
38    $post_constants = q|
39MY_POD2TEXT = echo "perl distro missing 'pod2text' to convert " |;
40  }
41}
42
43sub MY::postamble {
44  package MY;
45  my $postamble = q|
46README	: |. $module .q|
47	@$(MY_POD2TEXT) |. $module .q| > README
48
49|;
50}
51
52WriteMakefile(%makeparms);
53