From f83800d26d19472394e3b9e109d3fba20390ad61 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sat, 23 Nov 2013 20:14:56 +0100 Subject: [PATCH] rules: Use dpkg-buildflags to get CPPFLAGS and CFLAGS. --- debian/changelog | 1 + debian/rules | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 78d469b..292c026 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ libmpdclient (2.9-1) UNRELEASED; urgency=low - Updated for new upstream version. * debian/rules: - Split build target into build-arch and build-indep. + - Use dpkg-buildflags to get CPPFLAGS and CFLAGS. * debian/control: - Updated standards-version to 3.9.4. diff --git a/debian/rules b/debian/rules index 8c82591..4be60df 100755 --- a/debian/rules +++ b/debian/rules @@ -11,7 +11,9 @@ DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -CFLAGS = -Wall -g +CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) +CFLAGS = $(shell dpkg-buildflags --get CFLAGS) +CFLAGS += -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 @@ -33,7 +35,7 @@ config.status: configure --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr \ --mandir=\$${prefix}/share/man \ - CFLAGS="$(CFLAGS)" + CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" build: build-arch build-indep -- 2.30.2