diff options
author | Modestas Vainius <modestas@vainius.eu> | 2009-06-09 14:24:04 +0300 |
---|---|---|
committer | Modestas Vainius <modestas@vainius.eu> | 2009-06-09 14:24:04 +0300 |
commit | f72b0db0446788a867c5115845b28371ab5f0e9b (patch) | |
tree | 2029151f33a00592f9ad27faa61e91799567fb56 /Debian/Debhelper/Buildsystem/makefile.pm | |
parent | 299cb17e2a2a2524c628c0581ba2a85b2d9b2bed (diff) |
Implement source directory switching support (Closes: #530597).
* New optional option --sourcedirectory/-d.
* New Buildsystem API methods for getting source directory/path
(since sourcedir may no longer be topdir), source 2 build
directory convertions, doit_in_sourcedir() etc.
* clean_builddir() -> rmdir_builddir() rename.
Diffstat (limited to 'Debian/Debhelper/Buildsystem/makefile.pm')
-rw-r--r-- | Debian/Debhelper/Buildsystem/makefile.pm | 9 |
1 files changed, 5 insertions, 4 deletions
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'], @_); } } |