From: Ian Jackson Date: Fri, 29 Nov 2013 20:42:23 +0000 (+0000) Subject: debian/rules: use dpkg-buildflags and pass to Makefile. X-Git-Tag: debian/4.3.0~6 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=10f4dec74dc00896c1fcfcdf0b27afe94a765e6d;p=chiark-utils.git debian/rules: use dpkg-buildflags and pass to Makefile. --- diff --git a/debian/changelog b/debian/changelog index 376be02..ab7b0c3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,7 @@ chiark-utils (4.3.0) unstable; urgency=medium Build and portability fixes: * Makefile: honour CMDLINE_CFLAGS, CMDLINE_CPPFLAGS, CMDLINE_LDFLAGS. + * debian/rules: use dpkg-buildflags and pass to Makefile. * xbatmon-simple: Saner build rune. * cprogs/Makefile: clean deletes $PROGRAMS * random-word: Some perl-mode emacs formatting glitch workarounds. diff --git a/debian/rules b/debian/rules index d1ec815..b711bb1 100755 --- a/debian/rules +++ b/debian/rules @@ -13,9 +13,16 @@ cwd= $(shell pwd) d= $(cwd)/debian t= $d/tmp +makebuildargs := OPTIMISE= DEBUG= \ + CMDLINE_CFLAGS="$(shell dpkg-buildflags --get CFLAGS)" \ + CMDLINE_CPPFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)" \ + CMDLINE_LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)" + build: $(checkdir) - set -e; for s in $(subdirs_build_arch); do $(MAKE) -C $$s all; done + set -e; for s in $(subdirs_build_arch); do \ + $(MAKE) -C $$s all $(makebuildargs); \ + done touch build build-indep: build