diff options
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"); } |