summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Dh_Getopt.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-02-16 14:55:55 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-02-16 14:55:55 -0500
commit0f3f59fe6058edfda4010dc88bd3b8aa3ae70a6d (patch)
tree620de8f75a33cc930ca3a9ba88e92a9ee834da61 /Debian/Debhelper/Dh_Getopt.pm
parent9e9f49c03fe968effe2ade343d8665386bc8e4c2 (diff)
dh override targets
* dh: debian/rules override targets can change what is run for a specific debhelper command in a sequence. * dh: Redid all the examples to use override targets, since these eliminate all annoying boilerplate and are much easier to understand than the old method. * Remove rules.simple example, there's no need to use explcit targets with dh anymore.
Diffstat (limited to 'Debian/Debhelper/Dh_Getopt.pm')
-rw-r--r--Debian/Debhelper/Dh_Getopt.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm
index 950a37b..ddfb71b 100644
--- a/Debian/Debhelper/Dh_Getopt.pm
+++ b/Debian/Debhelper/Dh_Getopt.pm
@@ -159,6 +159,14 @@ sub parseopts {
}
}
+ # DH_INTERNAL_OPTIONS is used to pass additional options from
+ # dh through an override target to a command.
+ if (defined $ENV{DH_INTERNAL_OPTIONS}) {
+ $ENV{DH_INTERNAL_OPTIONS}=~s/^\s+//;
+ $ENV{DH_INTERNAL_OPTIONS}=~s/\s+$//;
+ unshift @ARGV, split(/\s+/,$ENV{DH_INTERNAL_OPTIONS});
+ }
+
my $ret=getoptions(\@ARGV, $options);
if (!$ret) {
warning("warning: unknown options will be a fatal error in a future debhelper release");