[debhelper-devel] Bug#880840: debhelper: build makefile rule does not replace dh build sequence
James Cowgill
jcowgill at debian.org
Mon Nov 6 14:55:57 UTC 2017
Hi,
On 05/11/17 08:23, Niels Thykier wrote:
> 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. Doing this seems to improve the situation:
#!/usr/bin/make -f
%:
dh $@
.PHONY: build-arch build-indep
build-arch build-indep:
dh $@
.PHONY: build
build: build-arch build-indep
However, dh still attempts to build the package twice but this time the
second instances of dh do nothing:
$ fakeroot debian/rules binary
dh binary
debian/rules build
make[1]: Entering directory '/tmp/y'
dh build-arch
dh_update_autotools_config -a
dh_autoreconf -a
dh_auto_configure -a
dh_auto_build -a
dh_auto_test -a
create-stamp debian/debhelper-build-stamp
dh build-indep
make[1]: Leaving directory '/tmp/y'
debian/rules build-arch
make[1]: Entering directory '/tmp/y'
dh build-arch
make[1]: Leaving directory '/tmp/y'
dh_testroot
dh_prep
dh_auto_install
dh_installdocs
dh_installchangelogs
dh_perl
dh_link
dh_strip_nondeterminism
dh_compress
dh_fixperms
dh_missing
debian/rules build-indep
make[1]: Entering directory '/tmp/y'
dh build-indep
make[1]: Leaving directory '/tmp/y'
dh_strip
dh_makeshlibs
dh_shlibdeps
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20171106/e22730d9/attachment-0003.sig>
More information about the debhelper-devel
mailing list