Re: RFS: snake4 (updated package)
-----BEGIN PGP SIGNED MESSAGE-----
On 2011-02-05 14:28, Peter Pentchev wrote:
> On Thu, Feb 03, 2011 at 12:37:18AM +0100, Niels Thykier wrote:
>> Finally there is this part, which I asked you to look at:
>> ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
>> CFLAGS += -O0
>> CFLAGS += -O2
>> 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 :)
Because the upstream Makefile ignores CFLAGS :P
> 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.
awesome, I did not know that :)
> 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.
Yeah, I assumed Ubuntu used the dpkg-buildflags approach for their new
> Hope that helps :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----