File: Makefile.PL

package info (click to toggle)
faqomatic 2.721-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,984 kB
  • ctags: 548
  • sloc: perl: 13,356; sh: 69; makefile: 47
file content (49 lines) | stat: -rw-r--r-- 1,064 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
use ExtUtils::MakeMaker;

sub MY::processPL {
	my $self = shift;
	local *processPL;
	$_ = $self->MM::processPL;
	my @lines = split("\n", $_);
	my $i;
	# include extra params on fom line
	for ($i=0; $i<@lines; $i++) {
		last if ($lines[$i] =~ m/^fom/);
	}
	$i+=1;	# we actually want to append the _next_ line.
	if ($lines >= @lines) {
		print STDERR "Warning: Makefile.PL's overriding of "
			."processPL seems to have failed.\n";
	} else {
		$lines[$i].= " PERL=\$(PERL)"
			." INSTALLSITELIB=\$(INSTALLSITELIB)";
	}
	$_ = join ("\n", @lines)."\n";
}

WriteMakefile(
	NAME			=> 'FAQ::OMatic',
	VERSION_FROM	=> 'lib/FAQ/OMatic.pm',
	'dist'			=> { 'COMPRESS'=>'gzip',
						 'SUFFIX'=>'gz',
						 'PREOP'=>'VERSION=${VERSION} dev-bin/distribute-prep',
						 'POSTOP'=>
				'VERSION=${VERSION} dev-bin/distribute-final'
						},
);


sub MY::top_targets {
  my $self = shift;
  my $string = $self->MM::top_targets;

   $string .= <<'EOF';

update_readme:
	lwp-request 'http://www.jonh.net/cgi-bin/faqomatic/fom?file=1026&render=text' > README

EOF

    $string;

}