Makefile.PL revision 1.2
1 2use ExtUtils::MakeMaker; 3use Carp; 4 5my $mm_version = $ExtUtils::MakeMaker::VERSION || $ExtUtils::MakeMaker::Version; 6if( $mm_version < 3.5 ) { 7 croak("Sorry, but MakeMaker 3.5 or better is needed to build this package."); 8} 9 10&WriteMakefile( 11 NAME => 'Term::ReadKey', 12 DISTNAME => 'TermReadKey', 13 LICENSE => 'perl', 14 META_MERGE => { 15 no_index => { 16 file => [qw(Configure.pm)], 17 package => [qw(Configure)], 18 }, 19 'meta-spec' => { version => 2 }, 20 resources => { 21 repository => { 22 type => 'git', 23 url => 'https://github.com/jonathanstowe/TermReadKey.git', 24 web => 'https://github.com/jonathanstowe/TermReadKey', 25 }, 26 }, 27 }, 28 VERSION_FROM => 'ReadKey.pm', 29 XSPROTOARG => '-noprototypes', 30 PM => { "ReadKey.pm" => '$(INST_LIBDIR)/ReadKey.pm'}, 31 32 'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" }, 33 "test" => { 34 "TESTS" => "t/*.t" 35 } 36 37# Uncomment these to allow testing of sgtty under Linux. Not needed normally. 38# INC => "-I/usr/include/bsd", 39# LIBS => "-lbsd" 40); 41 42sub MY::realclean { 43 my $self = shift; 44 $_ = $self->MM::realclean(); 45 s/\t/\trm -f cchars.h\n\t/; 46 $_; 47} 48 49sub MY::top_targets { 50 my $self = shift; 51 $_ = $self->MM::top_targets(); 52 $_ .= " 53 54sgtty cchars.h: genchars.pl 55 \$(PERL) -I. -I\$(PERL_LIB) genchars.pl 56 57distcc: genchars.pl 58 \$(PERL) -I. -I\$(PERL_LIB) genchars.pl dist 59 60ReadKey.c: cchars.h 61 62"; 63 $_; 64 65} 66 67sub MY::test { 68 my $self = shift; 69 $_ = $self->MM::test(); 70 s#example/test.pl#-w example/test.pl interactive#; 71 $_; 72} 73 74sub MY::test_interactive 75{ 76 return "Fooo"; 77} 78 79sub MY::pure_site_install 80{ 81 my $self = shift; 82 my $new = $self->MM::test(); 83 84 $new .= "\n\t./register_module Your::Module"; 85 return $new; 86} 87