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

From: Niels Thykier <[email-masked]>
Date: Sat, 12 Feb 2011 14:25:40 +0100

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

This will set CFLAGS to "-Wall -g" regardless of what dpkg-buildflags
provides.  Possible alternatives that appears to work are:

CFLAGS := $(CFLAGS) -Wall -g

CFLAGS  = $(shell dpkg-buildflags --get CFLAGS) -Wall -g

While related to #578597, I believe it to be a distinct issue. This was triggered
by this email[2] on debian-mentors.

Thank you in advance,
~Niels

[1] http://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options

[2] <[email-masked]>

- -- System Information:
Debian Release: 6.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

debian-policy depends on no packages.

debian-policy recommends no packages.

Versions of packages debian-policy suggests:
pn  doc-base                      <none>     (no description available)

- -- no debconf information