summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Dh_Buildsystems.pm
diff options
context:
space:
mode:
authorModestas Vainius <modestas@vainius.eu>2009-06-09 14:24:04 +0300
committerModestas Vainius <modestas@vainius.eu>2009-06-09 14:24:04 +0300
commitf72b0db0446788a867c5115845b28371ab5f0e9b (patch)
tree2029151f33a00592f9ad27faa61e91799567fb56 /Debian/Debhelper/Dh_Buildsystems.pm
parent299cb17e2a2a2524c628c0581ba2a85b2d9b2bed (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/Dh_Buildsystems.pm')
-rw-r--r--Debian/Debhelper/Dh_Buildsystems.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/Debian/Debhelper/Dh_Buildsystems.pm b/Debian/Debhelper/Dh_Buildsystems.pm
index 3cfaffb..179d633 100644
--- a/Debian/Debhelper/Dh_Buildsystems.pm
+++ b/Debian/Debhelper/Dh_Buildsystems.pm
@@ -26,6 +26,7 @@ our @BUILDSYSTEMS = (
);
my $opt_buildsys;
+my $opt_sourcedir;
my $opt_builddir;
my $opt_list;
@@ -42,6 +43,9 @@ sub create_buildsystem_instance {
if (!exists $bsopts{builddir} && defined $opt_builddir) {
$bsopts{builddir} = ($opt_builddir eq "") ? undef : $opt_builddir;
}
+ if (!exists $bsopts{sourcedir} && defined $opt_sourcedir) {
+ $bsopts{sourcedir} = ($opt_sourcedir eq "") ? undef : $opt_sourcedir;
+ }
return $module->new(%bsopts);
}
@@ -102,6 +106,10 @@ sub buildsystems_init {
# Available command line options
my %options = (
+ "d" => undef, # cancel default D_FLAG option spec
+ "d=s" => \$opt_sourcedir,
+ "sourcedirectory=s" => \$opt_sourcedir,
+
"b:s" => \$opt_builddir,
"builddirectory:s" => \$opt_builddir,