dpkg-buildpackage and new "-indep" debhelper options
Roger Leigh
rleigh at codelibre.net
Tue Dec 6 17:21:25 UTC 2011
On Tue, Dec 06, 2011 at 05:53:55PM +0100, Anton Gladky wrote:
> Hi all,
>
> I have an eigen3 package, which uses --before option to escape
> DOC-building on all platforms.
> debian/rules is looking so now:
>
> ====================================
> binary-indep:
> dh $@ --buildsystem=cmake --builddirectory=$(BUILDDIR) --before dh_auto_build
> cd $(BUILDDIR); $(MAKE) doc
> rm -f $(BUILDDIR)/doc/html/unsupported/installdox
> dh $@ --buildsystem=cmake --builddirectory=$(BUILDDIR) --after dh_auto_build
I think there's a fundamental issue with this --before and
--after logic: dh_auto_build is run in the /build/ rules. It
has no place in the /binary/ rules. If you call /any/ of the
binary sequences after the build sequences, they will already
have been run. Additionally, you should not be running
$(MAKE) in the binary-indep rule. Run it in build-indep,
which is there for exactly this purpose.
I've not yet seen a non-buggy use of --before and --after.
If you make proper use of override_xxx-indep and/or the
standard build-indep target, there should never be a reason
to use them. What is preventing you from building the
docs in build-indep?
> binary-arch:
> dh $@ --buildsystem=cmake --builddirectory=$(BUILDDIR)
>
> binary: binary-indep
binary *must* be dependent upon both binary-arch and binary-indep,
i.e.
binary: binary-arch binary-indep
However, if you have the generic
%:
dh $@ --buildsystem=cmake --builddirectory=$(BUILDDIR)
then both the binary-arch and binary targets may be deleted
entirely; dh will do the right thing.
> ====================================
> override_dh_auto_build-indep:
> cd $(BUILDDIR); $(MAKE) doc
> rm -f $(BUILDDIR)/doc/html/unsupported/installdox
> ====================================
>
> But "dpkg-buildpackage -B" as well as "pbuilder --binary-arch" are
> building DOCs, ignoring -indep option.
> What can be wrong there?
Are you using the latest debhelper? There was an issue with
-indep in #648901. It's fixed in 8.9.10; you might also need
to explicitly enable v9 compat mode. That bug shouldn't
affect -B though since it's calling the -arch targets directly.
Your use of dh --before/--after may have confused things
though.
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.
More information about the debian-science-maintainers
mailing list