tags 560600 + patch
thanks

Joey Hess <jo...@debian.org> writes:

> Jari Aalto wrote:
>
>> It seesm that it is possible to exclude commadn to be run (when not 
>> applicaple) in
>> debian/rules with:
>> 
>>    PHONY: override_<dh_command>
>> 
>> Please document this tip in dh(1) manual page.
>
> You can come up with all sorts of ways to provide an override_dh_command
> target; any such target will be used, as the dh man page documents.

Could tou consider applying this to debhelper's next release. Based on
your excellent reply. The patch is against Git.

Jari

>From 804a34f146172a67c222d7469aff5f7d9067d6b3 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aa...@cante.net>
Date: Mon, 14 Dec 2009 09:15:59 +0200
Subject: [PATCH] debhelper.pod: (NOTES::Overriding possibilities);: new section


Signed-off-by: Jari Aalto <jari.aa...@cante.net>
---
 debhelper.pod |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/debhelper.pod b/debhelper.pod
index a4765ba..7d6d41f 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -245,6 +245,32 @@ is manually specified with the I<--buildsystem> option.
 
 =head1 NOTES
 
+=head2 Overriding possibilities
+
+It is possible to use pattern rules to override a lot of commands in
+one target:
+
+    override_dh_install%:
+	    echo doing nothing for $@
+
+List of debhelper commands can also be read from a user defined file,
+say C<debian/dh_norun>, to create override targets for each of them:
+
+    $(shell sed 's/^/override_/' debian/dh_norun):
+
+Yet another possibility is to use C<.PHONY:> which implicitly creates
+targets. Beware that this feature is not documentated, so that might
+stop working tomorrow:
+
+     # You could do this:
+
+     .PHONY: override_dh_perl override_dh_python override_dh_auto_test
+
+     # But this id shorter, clearer, and does not rely on
+     # semi-undocumented make behavior
+
+     override_dh_perl override_dh_python override_dh_auto_test:
+
 =head2 Multiple binary package support
 
 If your source package generates more than one binary package, debhelper
-- 
1.6.5

Reply via email to