From 3e1ad7b06d530be1a9f88a9f23a61dd12cc6e112 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Sun, 10 Feb 2008 13:51:41 -0700 Subject: [PATCH] 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 --- debian/rules | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- 2.39.5