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 :) 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. Hope that helps :) G'luck, Peter -- Peter Pentchev firstname.lastname@example.org roam@FreeBSD.org email@example.com PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 I am the meaning of this sentence.
Description: Digital signature