chiark / gitweb /
cross-building: Do not include a makefile
[authbind.git] / debian / rules
index 625f4b1ca217349d11466f71932d635e8e5529b7..b4f4dc5f367397359ebfcd279106f9e4d2003515 100755 (executable)
 #
 # $Id$
 
 #
 # $Id$
 
--include /usr/share/dpkg/architecture.mk
-ifneq ($(DEB_HOST_GNU_TYPE),)
-TOOL_PREFIX=$(DEB_HOST_GNU_TYPE)-
-endif
-ifeq ($(origin CC),default)
-CC=$(TOOL_PREFIX)gcc
-endif
 SHELL=/bin/bash
 
 package=authbind
 SHELL=/bin/bash
 
 package=authbind
@@ -35,6 +28,11 @@ minor=0
 
 arch = $(shell dpkg --print-architecture)
 
 
 arch = $(shell dpkg --print-architecture)
 
+TOOL_PREFIX = $(shell set -x; a=`dpkg-architecture -q DEB_HOST_GNU_TYPE`; echo $$a$${a+-})
+ifeq ($(origin CC),default)
+CC=$(TOOL_PREFIX)gcc
+endif
+
 export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 -SDate)" +%s)
 
 INSTALL = install
 export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 -SDate)" +%s)
 
 INSTALL = install