diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2010-01-04 18:41:51 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2010-01-04 19:00:49 -0500 |
commit | 02bf22b2c4c695fd959f11c0d6a803795e014c2e (patch) | |
tree | 826d990cda08018db2c6cab9f62bc51b520a1952 /dh | |
parent | 09d21e9f004aabe6a409c981c8d11e7cb4c2051f (diff) | |
download | debhelper-02bf22b2c4c695fd959f11c0d6a803795e014c2e.tar.gz |
solve the dh -Bbuild problem
* Add -O option, which can be used to pass options to commands, ignoring
options that they do not support.
* dh: Use -O to pass user-specified options to the commands it runs.
This solves the problem with passing "-Bbuild" to dh, where commands
that do not support -B would see a bogus -u option. Closes: #541773
(It also ensures that the commands dh prints out can really be run.)
Diffstat (limited to 'dh')
-rwxr-xr-x | dh | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -175,7 +175,7 @@ default. This is how to use dh_pycentral instead. #!/usr/bin/make -f %: - dh --with python-central $@ + dh $@ --with python-central Here is how to force use of perl's Module::Build build system, which can be necessary if debhelper wrongly detects that the package @@ -183,14 +183,14 @@ uses MakeMaker. #!/usr/bin/make -f %: - dh --buildsystem=perl_build $@ + dh $@ --buildsystem=perl_build To patch your package using quilt, you can tell dh to use quilt's dh sequence addons like this: #!/usr/bin/make -f %: - dh --with quilt $@ + dh $@ --with quilt Here is an example of overriding where the dh_auto_* commands find the package's source, for a package where the source is located in a @@ -198,7 +198,7 @@ subdirectory. #!/usr/bin/make -f %: - dh --sourcedirectory=src $@ + dh $@ --sourcedirectory=src Finally, here is a way to prevent dh from running several commands that you don't want it to run, by defining empty override targets for each @@ -459,7 +459,17 @@ while (@ARGV_orig) { elsif ($opt =~ /^--?(no-act|remaining|(after|until|before|with|without)=)/) { next; } - push @options, $opt; + elsif ($opt=~/^-/) { + push @options, "-O".$opt; + } + elsif (@options) { + if ($options[$#options]=~/^-O--/) { + $options[$#options].="=".$opt; + } + else { + $options[$#options].=$opt; + } + } } # Figure out at what point in the sequence to start for each package. |