]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh
Merge branch 'master' into buildsystems
[debhelper.git] / dh
diff --git a/dh b/dh
index 427a1c9dc2230e4d118302de4d4b55ab15a8b5b2..bcd5b02dae530fbf3055cbacab5b013c84fb0a7d 100755 (executable)
--- a/dh
+++ b/dh
@@ -11,7 +11,7 @@ use Debian::Debhelper::Dh_Lib;
 
 =head1 SYNOPSIS
 
-B<dh> sequence [B<--with> I<addon>] [B<--until> I<cmd>] [B<--before> I<cmd>] [B<--after> I<cmd>] [B<--remaining>] [S<I<debhelper options>>]
+B<dh> sequence [B<--with> I<addon>[,I<addon>,...]] [B<--until> I<cmd>] [B<--before> I<cmd>] [B<--after> I<cmd>] [B<--remaining>] [S<I<debhelper options>>]
 
 =head1 DESCRIPTION
 
@@ -45,11 +45,12 @@ you should Build-Depend on debhelper 7.0.50 or above.)
 
 =over 4
 
-=item B<--with> I<addon>
+=item B<--with> I<addon>[,I<addon>,...]
 
 Add the debhelper commands specified by the given addon to appropriate places
 in the sequence of commands that is run. This option can be repeated more
-than once, and is used when there is a third-party package that provides
+than once, or multiple addons can be listed, separated by commas.
+This is used when there is a third-party package that provides
 debhelper commands. See the PROGRAMMING file for documentation about
 the sequence addon interface.
 
@@ -171,6 +172,23 @@ default. This is how to use dh_pycentral instead.
        %:
                dh --with python-central $@
 
+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 $@
+
+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
+subdirectory. It also forces use of perl's Module::Build build system,
+which can be necessary if debhelper wrongly detects that the package
+uses MakeMaker.
+
+       #!/usr/bin/make -f
+       %:
+               dh --sourcedirectory=src --buildsystem=perl_build $@
+
 =cut
 
 # Stash this away before init modifies it.
@@ -187,7 +205,7 @@ init(options => {
        "remaining" => \$dh{REMAINING},
        "with=s" => sub {
                my ($option,$value)=@_;
-               push @{$dh{WITH}},$value;
+               push @{$dh{WITH}},split(",", $value);
        },
        "without=s" => sub {
                my ($option,$value)=@_;
@@ -244,7 +262,6 @@ $sequences{install} = [@{$sequences{build}}, qw{
        dh_gconf
        dh_icons
        dh_perl
-       dh_scrollkeeper
        dh_usrlocal
 
        dh_link
@@ -463,9 +480,13 @@ sub run {
                        # Need to handle logging for overriden commands here,
                        # because the actual debhelper command may not have
                        # been run by the rules file target.
-                       my %packages=map { $_ => 1 } @packages;
-                       map { delete $packages{$_} } @exclude;
-                       write_log($override_command, keys %packages);
+                       # (But avoid logging for dh_clean since it removes
+                       # the log earlier.)
+                       if ($override_command ne 'dh_clean') {
+                               my %packages=map { $_ => 1 } @packages;
+                               map { delete $packages{$_} } @exclude;
+                               write_log($override_command, keys %packages);
+                       }
                }
        }
 }