summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Buildsystem
diff options
context:
space:
mode:
authorModestas Vainius <modestas@vainius.eu>2009-06-11 11:47:20 +0300
committerModestas Vainius <modestas@vainius.eu>2009-06-11 11:54:52 +0300
commitf382ce5a2ef97c6e45ec4bd221117493d4f87c90 (patch)
treef6b0fb7b37855ae3cb8fe38fe12df4cd1a4bcb61 /Debian/Debhelper/Buildsystem
parent82f043bf5f2d1257aefa639cb058e8e3f3ef00f6 (diff)
Make perl_makemaker work properly when in source building is enforced.
This is backwards compatible (with << 7.3) until build, test and clean steps are not reimplemented in the backwards compatibility breaking way. However, this is absolutely necessary for enforce_in_source_building() to work in corner cases (when build directory is set) in build, test and clean steps as the next class (makefile) does not enforce it. makefile will fail as it will look for Makefile in the build directory rather than the source directory. Signed-off-by: Modestas Vainius <modestas@vainius.eu>
Diffstat (limited to 'Debian/Debhelper/Buildsystem')
-rw-r--r--Debian/Debhelper/Buildsystem/perl_makemaker.pm21
1 files changed, 15 insertions, 6 deletions
diff --git a/Debian/Debhelper/Buildsystem/perl_makemaker.pm b/Debian/Debhelper/Buildsystem/perl_makemaker.pm
index ebce9a5..4281fa2 100644
--- a/Debian/Debhelper/Buildsystem/perl_makemaker.pm
+++ b/Debian/Debhelper/Buildsystem/perl_makemaker.pm
@@ -17,13 +17,22 @@ sub check_auto_buildable {
my $this=shift;
my ($step)=@_;
- # Handles configure, install; the rest - next class
- if ($step eq "install" || $step eq "configure") {
- return -e $this->get_sourcepath("Makefile.PL");
- }
- else {
- return 0;
+ # Handles everything if Makefile.PL exists. Otherwise - next class.
+ if (-e $this->get_sourcepath("Makefile.PL")) {
+ if ($step eq "install" || $step eq "configure") {
+ return 1;
+ }
+ else {
+ # This is backwards compatible (with << 7.3) until build, test and
+ # clean steps are not reimplemented in the backwards compatibility
+ # breaking way. However, this is absolutely necessary for
+ # enforce_in_source_building() to work in corner cases in build,
+ # test and clean steps as the next class (makefile) does not
+ # enforce it.
+ return $this->SUPER::check_auto_buildable(@_);
+ }
}
+ return 0;
}
sub new {