chiark / gitweb /
cross-building: Do not include a makefile
[authbind.git] / debian / rules
index 625f4b1..b4f4dc5 100755 (executable)
 #
 # $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
@@ -35,6 +28,11 @@ minor=0
 
 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