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

Re: flow of things rules/debhelper (still confused)



On Wed, Apr 07, 2010 at 06:13:25PM +0200, jmroth+deb@iip.lu wrote:
> >> I am still confused about my initial question when which binary-*
> >> target in debian/rules is called.
> >
> > Very simple: binary-arch to build all arch-dependent packages from that
> > source and binary-indep to build all arch-independent packages. The
> > binary target should then depend on binary-arch and binary-indep, so
> > with 'binary' all packages are build.
> 
> Yeah but I was talking about a debian/rules like
> 
> binary-indep:
> 	cmd1
> 	cmd2
> 
> %:
> 	dh $@

Well, this is just wrong. As you can find in Debian Policy, the binary
target has to depend on binary-arch and -indep which is not provided
here. There isn't much to document. It's standard Makefile behavior.

> Here, you can be sure that binary-indep is ignored. (In other words,
> there will only be a call from the build tools to "debian/rules
> binary" which will invoke "dh binary", which in turn will run "dh
> binary-indep", ... but not "debian/rules binary-indep".
> 
> So one should mention somewhere that since the introduction of
> 
> %:
> 	dh $@
> 
> some targets in debian/rules have become obsolete, and what one could
> do to achieve the old behavior with the new "syntax".

No target is obsolete, it's just covered by the catch-all target %. If
you want to explicitly define the targets yourself, you need to follow
Debian Policy yourself.

As a matter of fact, I find the dh7 syntax very confusing for beginners
(espacially for those unfamiliar with Makefiles). The NMG should cover a
more detailed debian/rules to explain how it works. The dh7 stuff is
just sugar code on top of it *after* understanding how the build process
really works. But I admit I never really cared about that guide.

Hauke

Attachment: signature.asc
Description: Digital signature


Reply to: