Bug#613046: debian-policy: please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)

2012-02-01 Thread Niels Thykier
On 2012-02-01 01:43, Jonathan Nieder wrote: > Hi, > > Charles Plessy wrote: > >> [...] > > By now I imagine that dpkg-buildflags is becoming enough of a de facto > standard that it would be reasonable to just recommend it with a policy > "should". Niels, would you mind if I merge this with bug#

Bug#613046: debian-policy: please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)

2012-01-31 Thread Jonathan Nieder
Hi, Charles Plessy wrote: > since §4.9.1's object is to document the DEB_BUILD_OPTIONS, I would find it a > bit dry to only provide an example that works through a tool that is not > mentionned or explained anywhere else in the Policy (see > http://bugs.debian.org/578597). > I therfore propose t

Bug#613046: debian-policy: please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)

2012-01-31 Thread Russ Allbery
Charles Plessy writes: > By the way, I read in the paragraph describing noopt: > For C programs, it is best to add -O0 to CFLAGS (although this is > usually the default). > Isn't that a bit outdated ? I see -O2 or superior in most of my > packages. This is specifically in the context of i

Bug#613046: debian-policy: please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)

2012-01-31 Thread Charles Plessy
Le Fri, Jan 27, 2012 at 01:28:02PM +0100, Matthijs Kooijman a écrit : > > +CFLAGS := -Wall $(shell dpkg-buildflags --get CFLAGS) > > ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) > > INSTALL_PROGRAM += -s > > endif > > Wouldn't it be more appropriate to use > > DEB_CFLAGS_MAINT_PREPE

Bug#613046: debian-policy: please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)

2012-01-30 Thread Russ Allbery
Raphael Hertzog writes: > No because $(shell ...) only gets environment variable that were > existing at the time make has been invoked. Variables exported by the > makefile itself are not forwarded. :-( Ah, indeed. I didn't realize that. Using `` instead of $(shell) would of course work, but

Bug#613046: debian-policy: please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)

2012-01-30 Thread Raphael Hertzog
On Mon, 30 Jan 2012, Russ Allbery wrote: > > And you must take care because $(shell dpkg-buildflags ...) will not see > > the DEB_CFLAGS_MAINT_PREPEND that you have set in the rules > > files. Either you do $(shell > > DEB_CFLAGS_MAINT_PREPEND=... dpkg-buildflags ...) or you use > > /usr/share/dpkg

Bug#613046: debian-policy: please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)

2012-01-30 Thread Russ Allbery
Raphael Hertzog writes: > Well, they are there so that you can tweak the output of dpkg-buildflags > when the call happens in lower layer and that you have no control over > the call and its output. > And you must take care because $(shell dpkg-buildflags ...) will not see > the DEB_CFLAGS_MAINT

Bug#613046: debian-policy: please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)

2012-01-30 Thread Matthijs Kooijman
Hi folks, just stumbled upon this report, and I have a small suggestion to improve Jonathan's patch: > --- a/policy.sgml > +++ b/policy.sgml > @@ -2256,18 +2256,13 @@ > massage this example in order to make it work for your > package. > > -CFLAGS = -Wall -g > INSTA

Bug#613046: debian-policy: please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)

2012-01-30 Thread Raphael Hertzog
On Fri, 27 Jan 2012, Matthijs Kooijman wrote: > > -ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) > > -CFLAGS += -O0 > > -else > > -CFLAGS += -O2 > > -endif > > +CFLAGS := -Wall $(shell dpkg-buildflags --get CFLAGS) > > ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) > > INSTALL_PROGRAM

Bug#613046: debian-policy: please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)

2011-03-01 Thread Jonathan Nieder
user debian-pol...@packages.debian.org usertags 613046 + informative discussion quit Hi, Julien Cristau wrote: > On Sat, Feb 12, 2011 at 14:25:40 +0100, Niels Thykier wrote: >> CFLAGS = $(shell dpkg-buildflags --get CFLAGS) -Wall -g >> >> While related to #578597, I believe it to be a distinct

Bug#613046: debian-policy: please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)

2011-02-14 Thread Julien Cristau
On Mon, Feb 14, 2011 at 15:14:04 +0100, Raphael Hertzog wrote: > That said helper tools like "dh" should be free to use dpkg-buildflags > to set environment variables that ./configure and other similar calls > can inspect and use. > The usual way to pass CFLAGS to configure is as a command line a

Bug#613046: debian-policy: please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)

2011-02-14 Thread Raphael Hertzog
Hi, On Sat, 12 Feb 2011, Steve Langasek wrote: > On Sat, Feb 12, 2011 at 10:32:34PM +0100, Julien Cristau wrote: > > > CFLAGS := $(CFLAGS) -Wall -g > > > That would be wrong. A package build shouldn't depend on random env > > variables. > > Depend on, or respect? > > Why shouldn't we expect pa

Bug#613046: debian-policy: please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)

2011-02-12 Thread Steve Langasek
On Sat, Feb 12, 2011 at 10:32:34PM +0100, Julien Cristau wrote: > > CFLAGS := $(CFLAGS) -Wall -g > That would be wrong. A package build shouldn't depend on random env > variables. Depend on, or respect? Why shouldn't we expect packages to honor extra CFLAGS set in the environment, and require s

Bug#613046: debian-policy: please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)

2011-02-12 Thread Niels Thykier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 2011-02-12 22:32, Julien Cristau wrote: > On Sat, Feb 12, 2011 at 14:25:40 +0100, Niels Thykier wrote: > >> Package: debian-policy >> Version: 3.9.1.0 >> Severity: minor >> >> Hey >> >> The example in 4.9.1 suggests to set CFLAGS in a way that co

Bug#613046: debian-policy: please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)

2011-02-12 Thread Julien Cristau
On Sat, Feb 12, 2011 at 14:25:40 +0100, Niels Thykier wrote: > Package: debian-policy > Version: 3.9.1.0 > Severity: minor > > Hey > > The example in 4.9.1 suggests to set CFLAGS in a way that completely > overrides values from dpkg-buildpackage/dpkg-buildflags[1]: > > CFLAGS = -Wall -g > > Th

Bug#613046: debian-policy: please update example in 4.9.1 (debian/rules and DEB_BUILD_OPTIONS)

2011-02-12 Thread Niels Thykier
Package: debian-policy Version: 3.9.1.0 Severity: minor -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hey The example in 4.9.1 suggests to set CFLAGS in a way that completely overrides values from dpkg-buildpackage/dpkg-buildflags[1]: CFLAGS = -Wall -g This will set CFLAGS to "-Wall -g" rega