From: Neil Williams Date: Sun, 10 Feb 2008 20:51:41 +0000 (-0700) Subject: debian/rules: allow cross-building X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e1ad7b06d530be1a9f88a9f23a61dd12cc6e112;p=util-linux debian/rules: allow cross-building In line with the other cross-building support bugs: http://lists.debian.org/debian-devel/2007/11/msg00116.html This patch is necessary to allow util-linux to cross-build in Debian, following recommendations in autotools-dev. The cache file will be handled separately. Addresses-Debian-Bug: 465123 Signed-off-by: Neil Williams Signed-off-by: LaMont Jones --- diff --git a/debian/rules b/debian/rules index 1411327b..7c44545e 100755 --- a/debian/rules +++ b/debian/rules @@ -7,6 +7,14 @@ DISTRO :=$(shell lsb_release -is 2>/dev/null || echo Debian) +DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) +CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) --cache-file=$(DEB_HOST_GNU_TYPE).cache +else +CROSS= +endif + ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) STRIP=y endif @@ -35,7 +43,7 @@ endif configure: configure-stamp configure-stamp: dh_testdir - ./configure $(CONFOPTS) + ./configure $(CONFOPTS) $(CROSS) touch configure-stamp build: configure-stamp build-stamp