diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2018-09-12 22:11:25 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2018-09-13 11:18:26 +0100 |
commit | 9ee715feb56d03c7e0452a4c637a9e074bbf934b (patch) | |
tree | 81fd6115a68aabe7d6b377631d42349e33bbb4b4 /debian/rules.real | |
parent | 47d37cf9498f3a9c604e2cb68197b397fa42d87c (diff) | |
download | kernel_replicant_linux-9ee715feb56d03c7e0452a4c637a9e074bbf934b.tar.gz kernel_replicant_linux-9ee715feb56d03c7e0452a4c637a9e074bbf934b.tar.bz2 kernel_replicant_linux-9ee715feb56d03c7e0452a4c637a9e074bbf934b.zip |
debian/rules{,.real}: Use /usr/share/dpkg/architecture.mk
Currently we don't set all the architecture variables, so direct use
of these makefiles (not under dpkg-architecture or dpkg-buildpackage)
may fail.
In case ARCH and DEB_HOST_ARCH don't match in rules.real, we really
should fail, so add an explicit check for that.
This also fixes lintian warning
debian-rules-sets-dpkg-architecture-variable.
Diffstat (limited to 'debian/rules.real')
-rw-r--r-- | debian/rules.real | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/debian/rules.real b/debian/rules.real index b7af0ddbdc0a..24c2182e508a 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -16,8 +16,16 @@ ifeq ($(DISTRIBUTOR),) DISTRIBUTOR := Debian endif +include /usr/share/dpkg/architecture.mk + include debian/rules.defs +ifdef ARCH + ifneq ($(DEB_HOST_ARCH),$(ARCH)) + $(error Attempting to build a $(ARCH) target but host architecture is $(DEB_HOST_ARCH). Use dpkg-architecture to override the host architecture) + endif +endif + ifdef OVERRIDE_HOST_TYPE CROSS_COMPILE := $(OVERRIDE_HOST_TYPE)- else ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) |