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. For example, you could use pattern rules to override a lot of commands in one target. override_dh_install%: echo doing nothing for $@ You could even read a list of debhelper commands from a debian/dh_norun file and create override targets for each of them. Amazingly this can be done in one line of make: $(shell sed 's/^/override_/' debian/dh_norun): Apparently .PHONY implicitly creates targets. So that works as well. Note though that I can't find an explicit mention of this in make's documentation. So as far as I know, that might stop working tomorrow. I don't think the dh man page needs to document every way that override targets can be set up in a make file. Make's documentation is sure to be better. I'm glad to add examples to the man page if they are clear and non-obfuctated. But why is this: .PHONY: override_dh_perl override_dh_python override_dh_auto_test Better than this: override_dh_perl override_dh_python override_dh_auto_test: That is shorter, clearer, and does not rely on semi-undocumented make behavior; it's a standard set of targets that just happen to do nothing. And the normal optimisation-related reason to use PHONY rules does not apply here AFAICS. -- see shy jo
signature.asc
Description: Digital signature