From 6392a541d815d50cfa84b689901c7e36cee6e7ba Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Wed, 23 Oct 2013 09:53:48 -0600 Subject: [PATCH] honor dpkg-buildflags and DEB_BUILD_OPTIONS better, #727196 --- debian/changelog | 7 +++++++ debian/rules | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 8229aa28..b1cb3829 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +tar (1.27-3) UNRELEASED; urgency=low + + * honor DEB_BUILD_OPTIONS parallel=, honor dpkg-buildflags in build + target in addition to configure target, closes: #727196 + + -- Bdale Garbee Wed, 23 Oct 2013 09:53:31 -0600 + tar (1.27-2) unstable; urgency=low * claim support for mime type application/x-ustar too, and no longer diff --git a/debian/rules b/debian/rules index 5ab1d39a..8adc9887 100755 --- a/debian/rules +++ b/debian/rules @@ -11,6 +11,11 @@ CFLAGS += -Wall LDFLAGS += `dpkg-buildflags --get LDFLAGS` CPPFLAGS = `dpkg-buildflags --get CPPFLAGS` +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + MAKEFLAGS += -j$(NUMJOBS) +endif + configure: configure-stamp configure-stamp: dh_testdir @@ -29,7 +34,8 @@ build-arch: build-stamp build-indep: build-stamp build-stamp: configure-stamp dh_testdir - RSH="/usr/bin/rsh" CFLAGS="-O2 -g -Wall -fno-gnu89-inline" $(MAKE) + RSH="/usr/bin/rsh" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" $(MAKE) ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) -- 2.30.2