Split build rules for tools to allow skipping them.

Split the rules in d/rules.real so that the [un]versioned_tools
knobs can be used to avoid building them.

This is necessary since the build-dependency were moved to be
conditional on those knobs, so the build fails when the
unversioned tools are set to disabled as libpci-dev is not
installed but the tools are built and fail due to it missing.

Signed-off-by: Luca Boccassi <bluca@debian.org>
This commit is contained in:
Luca Boccassi 2018-10-26 14:46:06 +01:00
parent 983a169e24
commit f5f169ba99
2 changed files with 41 additions and 11 deletions

5
debian/changelog vendored
View File

@ -14,6 +14,11 @@ linux (4.19.5-1~exp2) UNRELEASED; urgency=medium
[ Uwe Kleine-König ]
* Enable usb support for ATH10K (Closes: #915083)
[ Luca Boccassi ]
* debian/rules.real: Split the rules so that the [un]versioned_tools
knobs can be used to avoid building them. Fixes FTBFS with unversioned
tools disabled.
-- Uwe Kleine-König <ukleinek@debian.org> Wed, 28 Nov 2018 12:20:46 +0100
linux (4.19.5-1~exp1) experimental; urgency=medium

47
debian/rules.real vendored
View File

@ -91,20 +91,24 @@ endif
binary-indep: install-support
ifneq ($(DO_TOOLS_VERSIONED),False)
build-arch-arch: $(STAMPS_DIR)/build-tools
build-arch-arch: build-kbuild
binary-arch-arch: install-kbuild
ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel mipsr6 mipsr6el mips64r6 mips64r6el mipsn32 mipsn32el mipsn32r6 mipsn32r6el powerpc ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_HOST_ARCH)),)
ifeq ($(filter nopython,$(DEB_BUILD_PROFILES)),)
build-arch-arch: build-perf
binary-arch-arch: install-perf
endif
endif
ifneq ($(filter powerpc powerpcspe ppc64,$(DEB_HOST_ARCH)),)
build-arch-arch: build-bootwrapper
binary-arch-arch: install-bootwrapper
endif
endif
ifneq ($(DO_TOOLS_UNVERSIONED),False)
build-arch-arch:build-usbip build-cpupower build-liblockdep
binary-arch-arch: install-usbip install-cpupower install-liblockdep
ifneq ($(filter i386 amd64 x32,$(DEB_HOST_ARCH)),)
build-arch-arch: build-hyperv-daemons
binary-arch-arch: install-hyperv-daemons
endif
binary-indep: install-lockdep
@ -603,15 +607,15 @@ define make-tools
+mkdir -p $(BUILD_DIR)/build-tools/$(1) && $(MAKE_CLEAN) -C $(BUILD_DIR)/build-tools/$(1) -f $(CURDIR)/debian/rules.d/$(1)/Makefile top_srcdir=$(CURDIR) top_rulesdir=$(CURDIR)/debian/rules.d OUTDIR=$(1) VERSION=$(VERSION) KERNEL_ARCH=$(KERNEL_ARCH)
endef
$(STAMPS_DIR)/build-tools:
$(call make-tools,.)
@$(stamp)
build-kbuild:
$(call make-tools,scripts)
$(call make-tools,tools/objtool)
install-kbuild: PACKAGE_NAME = linux-kbuild-$(VERSION)
install-kbuild: DH_OPTIONS = -p$(PACKAGE_NAME)
install-kbuild: PREFIX_DIR = /usr/lib/$(PACKAGE_NAME)
install-kbuild: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
install-kbuild: $(STAMPS_DIR)/build-tools
install-kbuild: build-kbuild
dh_testdir
dh_testroot
dh_prep
@ -631,9 +635,15 @@ endif
dh_md5sums
dh_builddeb
build-cpupower:
$(call make-tools,tools/power/cpupower)
ifneq ($(filter i386 amd64 x32,$(DEB_HOST_ARCH)),)
$(call make-tools,tools/power/x86)
endif
install-cpupower: DH_OPTIONS = -plinux-cpupower -plibcpupower1 -plibcpupower-dev
install-cpupower: DIR = $(CURDIR)/debian/cpupower-tmp
install-cpupower: $(STAMPS_DIR)/build-tools
install-cpupower: build-cpupower
dh_testdir
dh_testroot
dh_prep
@ -665,10 +675,13 @@ endif
dh_md5sums
dh_builddeb
build-perf:
$(call make-tools,tools/perf)
install-perf: PACKAGE_NAME = linux-perf-$(VERSION)
install-perf: DH_OPTIONS = -p$(PACKAGE_NAME)
install-perf: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
install-perf: $(STAMPS_DIR)/build-tools
install-perf: build-perf
dh_testdir
dh_testroot
dh_prep
@ -689,9 +702,12 @@ endif
dh_md5sums
dh_builddeb
build-usbip:
$(call make-tools,tools/usb/usbip)
install-usbip: DH_OPTIONS = -pusbip
install-usbip: DIR = $(CURDIR)/debian/usbip-tmp
install-usbip: $(STAMPS_DIR)/build-tools
install-usbip: build-usbip
dh_testdir
dh_testroot
dh_prep
@ -714,10 +730,13 @@ endif
dh_md5sums
dh_builddeb
build-hyperv-daemons:
$(call make-tools,tools/hv)
install-hyperv-daemons: PACKAGE_NAME = hyperv-daemons
install-hyperv-daemons: DH_OPTIONS = -p$(PACKAGE_NAME)
install-hyperv-daemons: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
install-hyperv-daemons: $(STAMPS_DIR)/build-tools
install-hyperv-daemons: build-hyperv-daemons
dh_testdir
dh_testroot
dh_prep
@ -749,9 +768,12 @@ endif
dh_md5sums
dh_builddeb
build-liblockdep:
$(call make-tools,tools/lib/lockdep)
install-liblockdep: DH_OPTIONS = -pliblockdep$(VERSION) -pliblockdep-dev
install-liblockdep: DIR = $(CURDIR)/debian/liblockdep-tmp
install-liblockdep: $(STAMPS_DIR)/build-tools
install-liblockdep: build-liblockdep
dh_testdir
dh_testroot
dh_prep
@ -797,10 +819,13 @@ endif
dh_md5sums
dh_builddeb
build-bootwrapper:
$(call make-tools,arch/powerpc/boot)
install-bootwrapper: PACKAGE_NAME = linux-bootwrapper-$(ABINAME)
install-bootwrapper: DH_OPTIONS = -p$(PACKAGE_NAME)
install-bootwrapper: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
install-bootwrapper: $(STAMPS_DIR)/build-tools
install-bootwrapper: build-bootwrapper
dh_testdir
dh_testroot
dh_prep