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.
This commit is contained in:
parent
47d37cf949
commit
9ee715feb5
|
@ -23,6 +23,7 @@ linux (4.19~rc3-1~exp2) UNRELEASED; urgency=medium
|
||||||
* tools: turbostat: Add checks for failure of fgets() and fscanf()
|
* tools: turbostat: Add checks for failure of fgets() and fscanf()
|
||||||
* debian/control: Build-depend on texlive-latex-{base,extra}, dvipng for
|
* debian/control: Build-depend on texlive-latex-{base,extra}, dvipng for
|
||||||
linux-doc
|
linux-doc
|
||||||
|
* debian/rules{,.real}: Use /usr/share/dpkg/architecture.mk
|
||||||
|
|
||||||
-- Ben Hutchings <ben@decadent.org.uk> Mon, 10 Sep 2018 22:25:53 +0100
|
-- Ben Hutchings <ben@decadent.org.uk> Mon, 10 Sep 2018 22:25:53 +0100
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
SHELL := sh -e
|
SHELL := sh -e
|
||||||
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
|
||||||
SOURCE := $(shell dpkg-parsechangelog -SSource)
|
SOURCE := $(shell dpkg-parsechangelog -SSource)
|
||||||
VERSION := $(shell dpkg-parsechangelog -SVersion)
|
VERSION := $(shell dpkg-parsechangelog -SVersion)
|
||||||
VERSION_UPSTREAM := $(shell echo "$(VERSION)" | sed -e 's,-[^-]*$$,,')
|
VERSION_UPSTREAM := $(shell echo "$(VERSION)" | sed -e 's,-[^-]*$$,,')
|
||||||
VERSION_BINNMU := $(shell echo "$(VERSION)" | sed -rne 's,.*\+b([0-9]+)$$,\1,p')
|
VERSION_BINNMU := $(shell echo "$(VERSION)" | sed -rne 's,.*\+b([0-9]+)$$,\1,p')
|
||||||
|
|
||||||
|
include /usr/share/dpkg/architecture.mk
|
||||||
|
|
||||||
include debian/rules.defs
|
include debian/rules.defs
|
||||||
|
|
||||||
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
||||||
|
|
|
@ -16,8 +16,16 @@ ifeq ($(DISTRIBUTOR),)
|
||||||
DISTRIBUTOR := Debian
|
DISTRIBUTOR := Debian
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
include /usr/share/dpkg/architecture.mk
|
||||||
|
|
||||||
include debian/rules.defs
|
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
|
ifdef OVERRIDE_HOST_TYPE
|
||||||
CROSS_COMPILE := $(OVERRIDE_HOST_TYPE)-
|
CROSS_COMPILE := $(OVERRIDE_HOST_TYPE)-
|
||||||
else ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
|
else ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
|
||||||
|
|
Loading…
Reference in New Issue