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

version graph

Package: debian-policy; Maintainer for debian-policy is Debian Policy Editors <[email protected]>; Source for debian-policy is src:debian-policy (PTS, buildd, popcon).

Reported by: Niels Thykier <[email protected]>

Date: Sat, 12 Feb 2011 13:30:04 UTC

Severity: wishlist

Merged with 578597

Found in version debian-policy/3.9.1.0

Full log


Message #40 received at [email protected] (full text, mbox, reply):

Received: (at 613046) by bugs.debian.org; 30 Jan 2012 14:14:36 +0000
From [email protected] Mon Jan 30 14:14:36 2012
X-Spam-Checker-Version: SpamAssassin 3.3.1-bugs.debian.org_2005_01_02
	(2010-03-16) on busoni.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-6.0 required=4.0 tests=BAYES_00,FROMDEVELOPER
	autolearn=ham version=3.3.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 6; hammy, 150; neutral, 73; spammy, 1.
	spammytokens:0.870-+--Policy hammytokens:0.000-+--H*u:1.5.21,
	0.000-+--H*UA:1.5.21, 0.000-+--H*u:2010-09-15, 0.000-+--H*UA:2010-09-15,
	0.000-+--debianpolicy
Return-path: <[email protected]>
Received: from mail.vm.ouaza.com ([88.190.240.227])
	by busoni.debian.org with esmtp (Exim 4.72)
	(envelope-from <[email protected]>)
	id 1Rrs0B-0000LG-42
	for [email protected]; Mon, 30 Jan 2012 14:14:36 +0000
Received: from soleymieux.ouaza.com (soleymieux.ouaza.com [78.225.60.32])
	by mail.vm.ouaza.com (Postfix) with ESMTPSA id C023E220038;
	Mon, 30 Jan 2012 15:14:28 +0100 (CET)
Received: by soleymieux.ouaza.com (Postfix, from userid 1000)
	id C47E915C10E; Mon, 30 Jan 2012 15:14:26 +0100 (CET)
Date: Mon, 30 Jan 2012 15:14:26 +0100
From: Raphael Hertzog <[email protected]>
To: Matthijs Kooijman <[email protected]>,
	Jonathan Nieder <[email protected]>, [email protected],
	Niels Thykier <[email protected]>,
	Julien Cristau <[email protected]>
Subject: Re: debian-policy: please update example in 4.9.1 (debian/rules and
 DEB_BUILD_OPTIONS)
Message-ID: <[email protected]>
References: <[email protected]>
 <[email protected]>
 <20110302033836.GA27022@elie>
 <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <[email protected]>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Virus-Scanned: clamav-milter 0.97.3 at mail
X-Virus-Status: Clean
Content-Transfer-Encoding: quoted-printable
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 += -s
> >  endif
> 
> Wouldn't it be more appropriate to use
> 
>     DEB_CFLAGS_MAINT_PREPEND := -Wall
> 
> here before calling dpkg-buildflags? Possibly the rest of the example
> could be modified to use DEB_CFLAGS_MAINT_APPEND as well.

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_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/buildflags.mk which does the right thing for you.

> Not sure if this is really needed, but it seems to me that that is what
> these variables were invented for :-)

Maybe all the samples from Policy should be simplified to use the Makefile
snippets...

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/




Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 08:17:25 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.