[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dh: different dh option for -indep



Olе Streicher <debian-devel@liska.ath.cx> wrote:
> my package will create a separate arch-independent -doc package with
> "sphinxdoc". Since therefore sphinx is not needed for architecure
> dependent builds, I moved the build dependency of the package into the
> Build-Depends-Indep field in debian/control:

> ---------------------8<------------------------
> Build-Depends: debhelper (>= 9), [...]
> Build-Depends-Indep: python-sphinx
> ---------------------8<------------------------

> The file debian/rules, however, still has the main rule:

> ---------------------8<------------------------
> %:
>        dh  $@ --with autoreconf,sphinxdoc
> ---------------------8<------------------------

> which fails when I try to build with the -B option with:

> dh: unable to load addon sphinxdoc: Can't locate Debian/Debhelper/Sequence/sphinxdoc.pm [...]

> What I tried is to create special targets for all arch dependent only builds:
[...]

Hello,
Assuming foo-doc is arch independent and therefore not built on -B this
should work: 

MYDHMODS := $(shell if dh_listpackages | grep -q foo-doc ; \
        then echo "--with autoreconf,sphinxdoc" ; \
        else echo "--with autoreconf" ; fi)

%:
        dh  $@ $(MYDHMODS)

hth, cu Andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'


Reply to: