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

Re: RFS: snake4 (updated package)

On Sat, Feb 05, 2011 at 03:28:16PM +0200, Peter Pentchev wrote:
> On Thu, Feb 03, 2011 at 12:37:18AM +0100, Niels Thykier wrote:
> [snip]
> > Finally there is this part, which I asked you to look at:
> > 
> > ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
> > 	CFLAGS += -O0
> > else
> > 	CFLAGS += -O2
> > endif
> > 
> > I do not see any changes to it, nor to the upstream Makefile. Does this
> > work as intended? That is, will
> > 
> >   DEB_BUILD_OPTIONS=noopt dpkg-buildpackage
> > 
> > produce an unoptimized package? As I recall I came to the conclusion
> > that it probably did not work, but feel free to correct me if I am wrong.
> Erm, why would it not work?  It's a standard snippet used in the rules
> files of many packages in the Debian archive :)

Oh... I admit I wrote that without taking a look at the actual snake4
package.  If the upstream source doesn't honor CPPFLAGS, CFLAGS and
LDFLAGS, then of course you're right and this snippet would do nothing

> Recently it has started to gradually disappear for two reasons:
> 1. dpkg-buildpackage now examines DEB_BUILD_OPTIONS by itself and sets
>    the appropriate CFLAGS and LDFLAGS (it also checks for "nostrip").
>    Still, this is far from perfect, since a package may not necessarily
>    be built using dpkg-buildpackage - e.g. during testing the maintainer
>    may sometimes run "debian/rules clean", "debian/rules build", etc. by
>    hand to see how it goes.
> 2. More recently, dpkg-dev 1.15.7 introduced the dpkg-buildflags tool
>    which is perfect for this task :)  You may take a look at the rules
>    files for the mbuffer or timelimit packages to see how it's used.


Peter Pentchev	roam@ringlet.net roam@FreeBSD.org peter@packetscale.com
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
If this sentence didn't exist, somebody would have invented it.

Attachment: signature.asc
Description: Digital signature

Reply to: