Control: tags -1 moreinfo On Sat, 4 Nov 2017 23:36:04 +0000 James Cowgill <jcowg...@debian.org> wrote: > Package: debhelper > Version: 10.10.5 > Severity: normal > > Hi, > > If you create a rules file with a manual build target like this: > #!/usr/bin/make -f > %: > dh $@ > > build: > echo hi > > Then, if you run the binary target directly, dh will run the build > target, but then also run the normal build sequence. > > [...] > > I would expect the part from dh_update_autotools_config to dh_auto_test > to be omitted in this case. > > I noticed this when I tried to enable Rules-Requires-Root in libopenmpt. > libopenmpt has a "build" target in debian/rules because upstream ships a > top-level "build" directory and make will cause "debian/rules build" to > be a no-op otherwise. > > Thanks, > James >
Hi James, I believe you need to explicitly define the build-arch and build-indep targets as well. The reason being that: binary depends on binary-indep, binary-arch and >install< install depends on >install-arch<, >install-indep< and >build< install-arch depends on >build-arch< install-indep depends on >build-indep< ... So dh ends up seeing that you provide a build target, but no build-arch nor build-indep. It then assumes it has to provide them for you, which leads to the behaviour you see. This becomes even more important when you do -B or -A builds, where the "build" target is not even considered (because dh starts with binary-arch or binary-indep respectively). Thanks, ~Niels