diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-02-27 15:11:25 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-02-27 15:11:25 -0500 |
commit | e3367a17054a70074c4a225e6073d3743959d05d (patch) | |
tree | 3baa02d9712484ef29d48640e58e0f6ef9263745 /Debian/Debhelper/Dh_Getopt.pm | |
parent | 281a8bd05b2a68198a59f1cffda101e1eb1d629e (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.
(cherry picked from commit 0f3f59fe6058edfda4010dc88bd3b8aa3ae70a6d)
Conflicts:
Debian/Debhelper/Dh_Getopt.pm
Debian/Debhelper/Dh_Lib.pm
debian/changelog
dh
Diffstat (limited to 'Debian/Debhelper/Dh_Getopt.pm')
-rw-r--r-- | Debian/Debhelper/Dh_Getopt.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm index f8e02889..d8019337 100644 --- a/Debian/Debhelper/Dh_Getopt.pm +++ b/Debian/Debhelper/Dh_Getopt.pm @@ -191,6 +191,15 @@ sub parseopts { "<>" => \&NonOption, ); + # 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) { error("unknown option; aborting"); } |