1 # A buildsystem plugin for handling Perl MakeMaker based projects.
3 # Copyright: © 2008-2009 Joey Hess
4 # © 2008-2009 Modestas Vainius
7 package Debian::Debhelper::Buildsystem::perl_makemaker;
10 use Debian::Debhelper::Dh_Lib;
11 use base 'Debian::Debhelper::Buildsystem::makefile';
14 "support for building Perl MakeMaker based packages (in-source only)"
17 sub check_auto_buildable {
21 # Handles configure, install; the rest - next class
22 if ($action eq "install") {
23 return -e "Makefile.PL";
25 # XXX JEH why test for configure here? If building or cleaning, and
26 # a Makefile.PL exists, we know this class can handle those
27 # actions -- it does so by inheriting from the makefile class.
28 # XXX MDX Yes. But that's again different behaviour from current
29 # (see comment in autotools.mk). Your call.
30 elsif ($action eq "configure") {
31 return -e "Makefile.PL";
40 my $self=$cls->SUPER::new(@_);
41 $self->enforce_in_source_building();
47 # If set to a true value then MakeMaker's prompt function will
48 # # always return the default without waiting for user input.
49 $ENV{PERL_MM_USE_DEFAULT}=1;
50 doit("perl", "Makefile.PL", "INSTALLDIRS=vendor", @_);
56 $self->SUPER::install($destdir, "PREFIX=/usr", @_);