From: Sebastian Harl Date: Sat, 23 Nov 2013 19:14:56 +0000 (+0100) Subject: rules: Use dpkg-buildflags to get CPPFLAGS and CFLAGS. X-Git-Tag: libmpdclient-2.9-1~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f83800d26d19472394e3b9e109d3fba20390ad61;p=pkg-libmpdclient.git rules: Use dpkg-buildflags to get CPPFLAGS and CFLAGS. --- 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