summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Buildsystem
diff options
context:
space:
mode:
Diffstat (limited to 'Debian/Debhelper/Buildsystem')
-rw-r--r--Debian/Debhelper/Buildsystem/autoconf.pm6
-rw-r--r--Debian/Debhelper/Buildsystem/cmake.pm5
-rw-r--r--Debian/Debhelper/Buildsystem/makefile.pm9
-rw-r--r--Debian/Debhelper/Buildsystem/perl_build.pm7
-rw-r--r--Debian/Debhelper/Buildsystem/perl_makemaker.pm9
-rw-r--r--Debian/Debhelper/Buildsystem/python_distutils.pm10
6 files changed, 21 insertions, 25 deletions
diff --git a/Debian/Debhelper/Buildsystem/autoconf.pm b/Debian/Debhelper/Buildsystem/autoconf.pm
index d7018bb2..5a553726 100644
--- a/Debian/Debhelper/Buildsystem/autoconf.pm
+++ b/Debian/Debhelper/Buildsystem/autoconf.pm
@@ -7,8 +7,6 @@
package Debian::Debhelper::Buildsystem::autoconf;
use strict;
-use File::Spec;
-use Debian::Debhelper::Dh_Lib;
use base 'Debian::Debhelper::Buildsystem::makefile';
sub DESCRIPTION {
@@ -21,7 +19,7 @@ sub check_auto_buildable {
# Handle configure; the rest - next class
if ($step eq "configure") {
- return -x "configure";
+ return -x $this->get_sourcepath("configure");
}
return 0;
}
@@ -50,7 +48,7 @@ sub configure {
}
$this->mkdir_builddir();
- $this->doit_in_builddir($this->get_rel2builddir_path("configure"), @opts, @_);
+ $this->doit_in_builddir($this->get_source_rel2builddir("configure"), @opts, @_);
}
1;
diff --git a/Debian/Debhelper/Buildsystem/cmake.pm b/Debian/Debhelper/Buildsystem/cmake.pm
index d1fe6899..a30fbb03 100644
--- a/Debian/Debhelper/Buildsystem/cmake.pm
+++ b/Debian/Debhelper/Buildsystem/cmake.pm
@@ -7,7 +7,6 @@
package Debian::Debhelper::Buildsystem::cmake;
use strict;
-use Debian::Debhelper::Dh_Lib;
use base 'Debian::Debhelper::Buildsystem::makefile';
sub DESCRIPTION {
@@ -17,7 +16,7 @@ sub DESCRIPTION {
sub check_auto_buildable {
my $this=shift;
my ($step)=@_;
- my $ret = -e "CMakeLists.txt";
+ my $ret = -e $this->get_sourcepath("CMakeLists.txt");
$ret &&= $this->SUPER::check_auto_buildable(@_) if $step ne "configure";
return $ret;
}
@@ -43,7 +42,7 @@ sub configure {
push @flags, "-DCMAKE_VERBOSE_MAKEFILE=ON";
$this->mkdir_builddir();
- $this->doit_in_builddir("cmake", $this->get_rel2builddir_path(), @flags);
+ $this->doit_in_builddir("cmake", $this->get_source_rel2builddir(), @flags);
}
1;
diff --git a/Debian/Debhelper/Buildsystem/makefile.pm b/Debian/Debhelper/Buildsystem/makefile.pm
index 4f15152b..47244408 100644
--- a/Debian/Debhelper/Buildsystem/makefile.pm
+++ b/Debian/Debhelper/Buildsystem/makefile.pm
@@ -7,13 +7,14 @@
package Debian::Debhelper::Buildsystem::makefile;
use strict;
-use Debian::Debhelper::Dh_Lib;
+use Debian::Debhelper::Dh_Lib qw(escape_shell);
use base 'Debian::Debhelper::Buildsystem';
sub get_makecmd_C {
my $this=shift;
- if ($this->get_builddir()) {
- return $this->{makecmd} . " -C " . $this->get_builddir();
+ my $buildpath = $this->get_buildpath();
+ if ($buildpath ne '.') {
+ return $this->{makecmd} . " -C " . escape_shell($buildpath);
}
return $this->{makecmd};
}
@@ -86,7 +87,7 @@ sub install {
sub clean {
my $this=shift;
- if (!$this->clean_builddir()) {
+ if (!$this->rmdir_builddir()) {
$this->make_first_existing_target(['distclean', 'realclean', 'clean'], @_);
}
}
diff --git a/Debian/Debhelper/Buildsystem/perl_build.pm b/Debian/Debhelper/Buildsystem/perl_build.pm
index 929d9e90..525b0e1c 100644
--- a/Debian/Debhelper/Buildsystem/perl_build.pm
+++ b/Debian/Debhelper/Buildsystem/perl_build.pm
@@ -7,7 +7,6 @@
package Debian::Debhelper::Buildsystem::perl_build;
use strict;
-use Debian::Debhelper::Dh_Lib;
use base 'Debian::Debhelper::Buildsystem';
sub DESCRIPTION {
@@ -18,9 +17,9 @@ sub check_auto_buildable {
my ($this, $step) = @_;
# Handles everything
- my $ret = -e "Build.PL";
+ my $ret = -e $this->get_sourcepath("Build.PL");
if ($step ne "configure") {
- $ret &&= -e "Build";
+ $ret &&= -e $this->get_sourcepath("Build");
}
return $ret;
}
@@ -28,7 +27,7 @@ sub check_auto_buildable {
sub do_perl {
my $this=shift;
$ENV{MODULEBUILDRC} = "/dev/null";
- doit("perl", @_);
+ $this->doit_in_sourcedir("perl", @_);
}
sub new {
diff --git a/Debian/Debhelper/Buildsystem/perl_makemaker.pm b/Debian/Debhelper/Buildsystem/perl_makemaker.pm
index 36586e43..ebce9a58 100644
--- a/Debian/Debhelper/Buildsystem/perl_makemaker.pm
+++ b/Debian/Debhelper/Buildsystem/perl_makemaker.pm
@@ -7,7 +7,6 @@
package Debian::Debhelper::Buildsystem::perl_makemaker;
use strict;
-use Debian::Debhelper::Dh_Lib;
use base 'Debian::Debhelper::Buildsystem::makefile';
sub DESCRIPTION {
@@ -20,7 +19,7 @@ sub check_auto_buildable {
# Handles configure, install; the rest - next class
if ($step eq "install" || $step eq "configure") {
- return -e "Makefile.PL";
+ return -e $this->get_sourcepath("Makefile.PL");
}
else {
return 0;
@@ -42,9 +41,9 @@ sub configure {
# This prevents Module::Install from interactive behavior.
$ENV{PERL_AUTOINSTALL}="--skipdeps";
- doit("perl", "Makefile.PL", "INSTALLDIRS=vendor",
- "create_packlist=0",
- @_);
+ $this->doit_in_sourcedir("perl", "Makefile.PL", "INSTALLDIRS=vendor",
+ "create_packlist=0",
+ @_);
}
sub install {
diff --git a/Debian/Debhelper/Buildsystem/python_distutils.pm b/Debian/Debhelper/Buildsystem/python_distutils.pm
index 01a8c14e..bfb76eea 100644
--- a/Debian/Debhelper/Buildsystem/python_distutils.pm
+++ b/Debian/Debhelper/Buildsystem/python_distutils.pm
@@ -8,7 +8,6 @@
package Debian::Debhelper::Buildsystem::python_distutils;
use strict;
-use Debian::Debhelper::Dh_Lib;
use base 'Debian::Debhelper::Buildsystem';
sub DESCRIPTION {
@@ -16,7 +15,8 @@ sub DESCRIPTION {
}
sub check_auto_buildable {
- return -e "setup.py";
+ my $this=shift;
+ return -e $this->get_sourcepath("setup.py");
}
sub setup_py {
@@ -24,9 +24,9 @@ sub setup_py {
my $act=shift;
if ($this->get_builddir()) {
- unshift @_, "--build-base=" . $this->get_builddir();
+ unshift @_, "--build-base=" . $this->get_build_rel2sourcedir();
}
- doit("python", "setup.py", $act, @_);
+ $this->doit_in_sourcedir("python", "setup.py", $act, @_);
}
sub build {
@@ -45,7 +45,7 @@ sub clean {
$this->setup_py("clean", "-a", @_);
# The setup.py might import files, leading to python creating pyc
# files.
- doit('find', '.', '-name', '*.pyc', '-exec', 'rm', '{}', ';');
+ $this->doit_in_sourcedir('find', '.', '-name', '*.pyc', '-exec', 'rm', '{}', ';');
}
1;