From f72b0db0446788a867c5115845b28371ab5f0e9b Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Tue, 9 Jun 2009 14:24:04 +0300 Subject: 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. --- Debian/Debhelper/Buildsystem/makefile.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Debian/Debhelper/Buildsystem/makefile.pm') 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'], @_); } } -- cgit v1.2.3