Control: tag -1 pending On Wed, Jan 27, 2016 at 02:48:47PM +0100, Balint Reczey wrote: > This patch can be generally useful for cross-compiling when > different build flags are used for the build and host systems.
> diff --git a/debian/rules b/debian/rules > index 84f6894..dfda63f 100755 > --- a/debian/rules > +++ b/debian/rules > @@ -15,6 +15,7 @@ include /usr/share/dpkg/buildflags.mk > > buildflags := CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \ > CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" > +buildflags_native := $(shell DEB_HOST_ARCH=$(DEB_BUILD_ARCH) dpkg-buildflags > --export=configure) > > # From Makefile.in > version = $(shell cat VERSION) > @@ -47,7 +48,7 @@ override_dh_auto_configure: > $(buildflags) \ > $(CURDIR)/src/libs/gnulib/configure $(confflags_gnulib) > ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) > - $(buildflags) YACC='bison -y' PSPRINT=lpr PAGE=A4 \ > + $(buildflags_native) YACC='bison -y' PSPRINT=lpr PAGE=A4 \ > DEB_HOST_GNU_TYPE=$(DEB_BUILD_GNU_TYPE) \ > env -u CONFIG_SITE \ > dh_auto_configure --builddirectory=debian/build-native -- \ Thanks for this patch! I don't think this quite works properly in all cases, though, because make doesn't re-export environment variables set in the Makefile to $(shell) (see https://bugs.debian.org/644412). I've applied a slightly different patch and will upload it soon: https://anonscm.debian.org/cgit/users/cjwatson/groff.git/commit/?id=79de7b1b18d30476be0d51d8605f5ef4697aae95 -- Colin Watson [[email protected]]

