diff options
Diffstat (limited to 'Debian/Debhelper/Buildsystem')
-rw-r--r-- | Debian/Debhelper/Buildsystem/ant.pm | 2 | ||||
-rw-r--r-- | Debian/Debhelper/Buildsystem/autoconf.pm | 4 | ||||
-rw-r--r-- | Debian/Debhelper/Buildsystem/cmake.pm | 10 | ||||
-rw-r--r-- | Debian/Debhelper/Buildsystem/makefile.pm | 14 | ||||
-rw-r--r-- | Debian/Debhelper/Buildsystem/perl_build.pm | 2 | ||||
-rw-r--r-- | Debian/Debhelper/Buildsystem/perl_makemaker.pm | 2 | ||||
-rw-r--r-- | Debian/Debhelper/Buildsystem/python_distutils.pm | 12 |
7 files changed, 21 insertions, 25 deletions
diff --git a/Debian/Debhelper/Buildsystem/ant.pm b/Debian/Debhelper/Buildsystem/ant.pm index 26bee95b..938fb446 100644 --- a/Debian/Debhelper/Buildsystem/ant.pm +++ b/Debian/Debhelper/Buildsystem/ant.pm @@ -14,7 +14,7 @@ sub DESCRIPTION { sub check_auto_buildable { my $this=shift; - return -e $this->get_sourcepath("build.xml"); + return $this->get_sourcepath("build.xml") ? 1 : 0; } sub new { diff --git a/Debian/Debhelper/Buildsystem/autoconf.pm b/Debian/Debhelper/Buildsystem/autoconf.pm index a97de9c6..d7b0bed2 100644 --- a/Debian/Debhelper/Buildsystem/autoconf.pm +++ b/Debian/Debhelper/Buildsystem/autoconf.pm @@ -18,9 +18,9 @@ sub check_auto_buildable { my $this=shift; my ($step)=@_; - # Handle configure; the rest - next class + # Handle configure; the rest - next class (compat with 7.0.x code path) if ($step eq "configure") { - return -x $this->get_sourcepath("configure"); + return 1 if -x $this->get_sourcepath("configure"); } return 0; } diff --git a/Debian/Debhelper/Buildsystem/cmake.pm b/Debian/Debhelper/Buildsystem/cmake.pm index 03e6ade5..3eddc74f 100644 --- a/Debian/Debhelper/Buildsystem/cmake.pm +++ b/Debian/Debhelper/Buildsystem/cmake.pm @@ -16,12 +16,12 @@ sub DESCRIPTION { sub check_auto_buildable { my $this=shift; my ($step)=@_; - my $ret = -e $this->get_sourcepath("CMakeLists.txt"); - if ($step ne "configure") { - $ret &&= -e $this->get_buildpath("CMakeCache.txt") && - $this->SUPER::check_auto_buildable(@_); + if (-e $this->get_sourcepath("CMakeLists.txt")) { + my $ret = $this->SUPER::check_auto_buildable(@_); + $ret++ if ($ret && -e $this->get_buildpath("CMakeCache.txt")); + return $ret > 0 ? $ret : 1; } - return $ret; + return 0; } sub new { diff --git a/Debian/Debhelper/Buildsystem/makefile.pm b/Debian/Debhelper/Buildsystem/makefile.pm index 704f9c95..083abc42 100644 --- a/Debian/Debhelper/Buildsystem/makefile.pm +++ b/Debian/Debhelper/Buildsystem/makefile.pm @@ -71,15 +71,11 @@ sub check_auto_buildable { my $this=shift; my ($step) = @_; - # Handles build, test, install, clean; configure - next class - if (grep /^\Q$step\E$/, qw{build test install clean}) { - # This is always called in the source directory, but generally - # Makefiles are created (or live) in the the build directory. - return -e $this->get_buildpath("Makefile") || - -e $this->get_buildpath("makefile") || - -e $this->get_buildpath("GNUmakefile"); - } - return 0; + # This is always called in the source directory, but generally + # Makefiles are created (or live) in the the build directory. + return (-e $this->get_buildpath("Makefile") || + -e $this->get_buildpath("makefile") || + -e $this->get_buildpath("GNUmakefile")) ? 1 : 0; } sub build { diff --git a/Debian/Debhelper/Buildsystem/perl_build.pm b/Debian/Debhelper/Buildsystem/perl_build.pm index 8974be2e..2afa5e59 100644 --- a/Debian/Debhelper/Buildsystem/perl_build.pm +++ b/Debian/Debhelper/Buildsystem/perl_build.pm @@ -21,7 +21,7 @@ sub check_auto_buildable { if ($step ne "configure") { $ret &&= -e $this->get_sourcepath("Build"); } - return $ret; + return $ret ? 1 : 0; } sub do_perl { diff --git a/Debian/Debhelper/Buildsystem/perl_makemaker.pm b/Debian/Debhelper/Buildsystem/perl_makemaker.pm index e109be57..473a3a7e 100644 --- a/Debian/Debhelper/Buildsystem/perl_makemaker.pm +++ b/Debian/Debhelper/Buildsystem/perl_makemaker.pm @@ -19,7 +19,7 @@ sub check_auto_buildable { # Handles everything if Makefile.PL exists. Otherwise - next class. if (-e $this->get_sourcepath("Makefile.PL")) { - if ($step eq "install" || $step eq "configure") { + if ($step eq "configure") { return 1; } else { diff --git a/Debian/Debhelper/Buildsystem/python_distutils.pm b/Debian/Debhelper/Buildsystem/python_distutils.pm index 219c6f9b..70307b0f 100644 --- a/Debian/Debhelper/Buildsystem/python_distutils.pm +++ b/Debian/Debhelper/Buildsystem/python_distutils.pm @@ -31,7 +31,7 @@ sub new { sub check_auto_buildable { my $this=shift; - return -e $this->get_sourcepath("setup.py"); + return -e $this->get_sourcepath("setup.py") ? 1 : 0; } sub not_our_cfg { @@ -117,10 +117,10 @@ sub setup_py { # Then, run setup.py with each available python, to build # extensions for each. - my $python_default = `pyversions -d`; - $python_default =~ s/^\s+//; - $python_default =~ s/\s+$//; - my @python_requested = split ' ', `pyversions -r 2>/dev/null`; + my $python_default = `pyversions -d`; + $python_default =~ s/^\s+//; + $python_default =~ s/\s+$//; + my @python_requested = split ' ', `pyversions -r 2>/dev/null`; if (grep /^\Q$python_default\E/, @python_requested) { @python_requested = ( grep(!/^\Q$python_default\E/, @python_requested), @@ -129,7 +129,7 @@ sub setup_py { } my @python_dbg; - my @dbg_build_needed = $this->dbg_build_needed(); + my @dbg_build_needed = $this->dbg_build_needed(); foreach my $python (map { $_."-dbg" } @python_requested) { if (grep /^(python-all-dbg|\Q$python\E)/, @dbg_build_needed) { push @python_dbg, $python; |