File: Makefile.PL

package info (click to toggle)
libterm-readkey-perl 2.12-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 144 kB
  • ctags: 52
  • sloc: perl: 1,088; makefile: 45
file content (52 lines) | stat: -rw-r--r-- 955 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
50
51
52
# Term::ReadKey Makefile.PL Version 2.12

use ExtUtils::MakeMaker;
use Carp;

if( $ExtUtils::MakeMaker::Version < 3.5 ) {
        croak("Sorry, but MakeMaker 3.5 or better is needed to build this package.");
}

#$Verbose = 0;
&WriteMakefile(
	NAME => "Term::ReadKey",
	DISTNAME => "TermReadKey",
	VERSION_FROM => "ReadKey.pm",
	PM => { "ReadKey.pm" => '$(INST_LIBDIR)/ReadKey.pm'},

# Uncomment these to allow testing of sgtty under Linux. Not needed normally.
#	INC => "-I/usr/include/bsd",
#	LIBS => "-lbsd"
);

sub MY::realclean {
	my $self = shift;
	$_ = $self->MM::realclean();
	s/\t/\trm -f cchars.h\n\t/;
	$_;
}

sub MY::top_targets {
	my $self = shift;
	$_ = $self->MM::top_targets();
	$_ .= "

sgtty cchars.h: genchars.pl
	\$(PERL) -I\$(PERL_LIB) genchars.pl

distcc: genchars.pl
	\$(PERL) -I\$(PERL_LIB) genchars.pl dist

ReadKey.c: cchars.h

";
	$_;

}

sub MY::test {
	my $self = shift;
	$_ = $self->MM::test();
	s/test.pl/-w test.pl/;
	$_;
}