1 # A debhelper build system class 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 base 'Debian::Debhelper::Buildsystem::makefile';
13 "Perl ExtUtils::MakeMaker (Makefile.PL)"
16 sub check_auto_buildable {
20 # Handles everything if Makefile.PL exists. Otherwise - next class.
21 if (-e $this->get_sourcepath("Makefile.PL")) {
22 if ($step eq "install" || $step eq "configure") {
26 # This is backwards compatible (with << 7.3) until build, test and
27 # clean steps are not reimplemented in the backwards compatibility
28 # breaking way. However, this is absolutely necessary for
29 # enforce_in_source_building() to work in corner cases in build,
30 # test and clean steps as the next class (makefile) does not
32 return $this->SUPER::check_auto_buildable(@_);
40 my $this=$class->SUPER::new(@_);
41 $this->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 # This prevents Module::Install from interactive behavior.
51 $ENV{PERL_AUTOINSTALL}="--skipdeps";
53 $this->doit_in_sourcedir("perl", "Makefile.PL", "INSTALLDIRS=vendor",
61 $this->SUPER::install($destdir, "PREFIX=/usr", @_);