On Wed, Jul 27, 2011 at 08:23:42AM +1000, Ben Finney wrote: > Kilian Krause <firstname.lastname@example.org> writes: > > > Hi Ben, > > > > On Tue, 2011-07-26 at 17:10 +1000, Ben Finney wrote: > > > Lintian recommends (via tag ‘debian-rules-missing-recommended-target’): > > > > > > ===== > > > N: Note that the following form is recommended however: > > > N: > > > N: build: build-arch build-indep > > > N: build-arch: build-stamp > > > N: build-indep: build-stamp > > > N: build-stamp: > > > N: build here > > > ===== > > > > If you're sure that you want to use dh but .PHONY then just put into > > your rules something like: > > > > build-indep: > > dh $@ > > build-arch: > > dh $@ > > build: build-arch build-indep > > > > No need for a stamp as dh is already producing stamps internally. > > This doesn't match Lintian's recommendation. Nor does the common ‘%:’ > style rule. > > Should Lintian's recommendation be changed? Quite possibly, I'm sure the lintian maintainers would be happy to have improved help text. I didn't write it with dh in mind, since dh works with build-arch and build-indep automatically since 8.1.0, and since 8.9.0 with v9 compatibility mode, dh supports proper overriding of sequences with make targets. But unless you're doing something really different, you shouldn't need to specify any build rules at all--just use override_dh_auto_build, e.g. override_dh_auto_build: ifneq (,$(shell dh_listpackages -a 2>/dev/null)) $(MAKE) -C debian/build all endif ifneq (,$(shell dh_listpackages -i 2>/dev/null)) $(MAKE) -C debian/build doc endif This does all the arch and indep building in the conditionals. The main problems with build-arch: build build-indep: build is that it can cause infinite recursion in combination with dh: build → dh build → build-arch → build → … because build-arch and build-indep are dependencies of build, not the wrong way around as in this case. Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
Description: Digital signature