[Build-common-hackers] Re: cdbs question

Martin-…ric Racine q-funk@pp.fishpool.fi
Thu, 4 Dec 2003 09:36:29 +0200 (EET)


On Wed, 3 Dec 2003, Colin Walters wrote:

> On Mon, 2003-12-01 at 16:08, Martin-√Čric Racine wrote:
> 
> > I really cannot see what would fail in the following diminutive Makefil=
e:
> > 
> > 8X-----
> > CC = gcc
> > CFLAGS = -Wall -O9
> 
> Offtopic but: -09?  Anything over -O2 will often at best have no effect,
> at worst make your program slower.

That is the optimization recommended by the upstream author. I kept it as such.

> > The addition of $(DESTDIR) to the software's crude Makefile was all it =
took to
> > make it work with a traditional debian/rules made of dh_* -powered targ=
ets, but
> > it won't do with CDBS, for some reason.
> 
> Just add this to the end of your debian/rules:
> 
> DEB_MAKE_INSTALL_TARGET := install DESTDIR=$(DEB_DESTDIR)

That finally made CDBS follow the Makefile, except for one buglet:  upstream's
ChangeLog ends up being packaged twice:  once as an uncompressed ChangeLog and
once as a compressed changelog.gz

> If you look at the source to makefile.mk, you'll see that it skips the
> common-install step if DEB_MAKE_INSTALL_TARGET isn't set. 

I think this should be emphasized in the documentation. I hadn't noticed this.

-- 
Martin-…ric Racine, ICT Consultant
http://www.pp.fishpool.fi/~q-funk/