]> git.donarmstrong.com Git - debhelper.git/commitdiff
dh(1): Add an example of using an override target to avoid dh running several command...
authorJoey Hess <joey@gnu.kitenet.net>
Tue, 15 Dec 2009 00:36:21 +0000 (19:36 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Tue, 15 Dec 2009 00:36:21 +0000 (19:36 -0500)
debian/changelog
dh

index 0203c2222d9fb3c7c0f2ab55f92539b4f715a9ae..97c7c856f85d089b90f1165434c9eaddcd2baf3a 100644 (file)
@@ -2,6 +2,8 @@ debhelper (7.4.11) UNRELEASED; urgency=low
 
   * dh(1): Minor rewording of documentation of override commands.
     Closes: #560421
+  * dh(1): Add an example of using an override target to avoid
+    dh running several commands. Closes: #560600
 
  -- Joey Hess <joeyh@debian.org>  Mon, 14 Dec 2009 19:23:25 -0500
 
diff --git a/dh b/dh
index dc588e21a8d5452f9b17ef1a8e0344b2ca17ae7d..862dc25b7c2757037246bd0ad98c11d5dc3e80bd 100755 (executable)
--- a/dh
+++ b/dh
@@ -87,12 +87,10 @@ All other options passed to dh are passed on to each command it runs. This
 can be used to set an option like "-v" or "-X" or "-N", as well as for more
 specialised options.
 
-=head1 COMMAND SPECIFICATION
-
-I<cmd> can be a full name of a debhelper command, or a substring. It'll first
-search for a command in the sequence exactly matching the name, to avoid any
-ambiguity. If there are multiple substring matches, the last one in the
-sequence will be used.
+In the above options, I<cmd> can be a full name of a debhelper command, or
+a substring. It'll first search for a command in the sequence exactly
+matching the name, to avoid any ambiguity. If there are multiple substring
+matches, the last one in the sequence will be used.
 
 =cut
 
@@ -179,6 +177,14 @@ default. This is how to use dh_pycentral instead.
        %:
                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
+uses MakeMaker.
+
+       #!/usr/bin/make -f
+       %:
+               dh --buildsystem=perl_build $@
+
 To patch your package using quilt, you can tell dh to use quilt's dh
 sequence addons like this:
        
@@ -188,13 +194,22 @@ sequence addons like this:
 
 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.
+subdirectory.
 
        #!/usr/bin/make -f
        %:
-               dh --sourcedirectory=src --buildsystem=perl_build $@
+               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
+command.
+
+       #!/usr/bin/make -f
+       %:
+               dh $@
+       
+       # Commands not to run:
+       override_dh_auto_test override_dh_compress override_dh_fixperms:
 
 =cut