From 7e07ef0202f92a5566c6f85ca0a4ac19751809a5 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 26 Apr 2018 14:11:03 +0100 Subject: [PATCH] nodoc: don't build linux-doc and don't install tools documentation Fully disable building and installing any documentation when the nodoc build-profile is used. Among other things this will help reducing build times when doing development builds, especially on IO-limited build workers. --- debian/changelog | 8 ++++++++ debian/rules | 5 +++++ debian/rules.real | 16 ++++++++++++++-- debian/templates/control.docs.in | 2 +- 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 87e1ddddf..f0802a3b6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +linux (4.17~rc3-1~exp2) UNRELEASED; urgency=medium + + [ Luca Boccassi ] + * Disable building linux-doc-* and tools documentation when the "nodoc" + build profile is used. + + -- Luca Boccassi Wed, 02 May 2018 12:59:01 +0100 + linux (4.17~rc3-1~exp1) experimental; urgency=medium * New upstream release candidate diff --git a/debian/rules b/debian/rules index c55afebf8..14cccc2cd 100755 --- a/debian/rules +++ b/debian/rules @@ -16,6 +16,11 @@ ifdef DEBIAN_KERNEL_JOBS MAKEFLAGS += -j$(DEBIAN_KERNEL_JOBS) endif BUILD_STAGE1 := $(filter stage1,$(DEB_BUILD_PROFILES)) +ifneq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) +# This only disables building the linux-doc package. +# The rules for tools packages check separately for the 'nodoc' profile. + MAKEFLAGS += DO_DOCS=False +endif ifneq (,$(filter pkg.linux.notools,$(DEB_BUILD_PROFILES))) MAKEFLAGS += DO_TOOLS=False endif diff --git a/debian/rules.real b/debian/rules.real index 9596a945b..8dc588cd7 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -217,7 +217,9 @@ endif @$(stamp) install-base: +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs $(INSTALLDOCS_ARGS) +endif dh_installchangelogs dh_compress dh_fixperms @@ -597,7 +599,9 @@ install-kbuild: $(STAMPS_DIR)/build-tools $(call make-tools,tools/objtool) install DESTDIR=$(DIR) prefix=$(PREFIX_DIR) dh_link $(PREFIX_DIR) /usr/src/$(PACKAGE_NAME) dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_strip dh_compress dh_fixperms @@ -627,8 +631,8 @@ ifneq ($(filter i386 amd64 x32,$(DEB_HOST_ARCH)),) endif dh_install --sourcedir=$(DIR) dh_installchangelogs - dh_installdocs ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) + dh_installdocs dh_installman endif dh_strip @@ -652,7 +656,9 @@ install-perf: $(STAMPS_DIR)/build-tools dh_perl /usr/share/perf_$(VERSION)-core/scripts/perl/Perf-Trace-Util/lib/ dh_python2 /usr/share/perf_$(VERSION)-core/scripts/python/Perf-Trace-Util/lib/ dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_lintian dh_strip dh_compress @@ -672,8 +678,8 @@ install-usbip: $(STAMPS_DIR)/build-tools $(call make-tools,tools/usb/usbip) install DESTDIR=$(DIR) dh_install --sourcedir=$(DIR) dh_installchangelogs - dh_installdocs ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) + dh_installdocs dh_installman endif dh_lintian @@ -703,7 +709,9 @@ install-hyperv-daemons: $(STAMPS_DIR)/build-tools || break; \ done dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_systemd_enable for service in fcopy kvp vss; do \ dh_installinit --name hyperv-daemons.hv-$$service-daemon \ @@ -732,7 +740,9 @@ install-liblockdep: $(STAMPS_DIR)/build-tools 'usr/lib/*/liblockdep.so.*' dh_install --sourcedir=$(DIR) dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_strip dh_compress dh_fixperms @@ -757,7 +767,9 @@ install-lockdep: > $(DIR)/usr/bin/lockdep chmod 755 $(DIR)/usr/bin/lockdep dh_installchangelogs +ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) dh_installdocs +endif dh_compress dh_fixperms dh_installdeb diff --git a/debian/templates/control.docs.in b/debian/templates/control.docs.in index 827b1eccc..4feaec26d 100644 --- a/debian/templates/control.docs.in +++ b/debian/templates/control.docs.in @@ -1,5 +1,5 @@ Package: @source_basename@-doc-@version@ -Build-Profiles: +Build-Profiles: Architecture: all Depends: ${misc:Depends} Section: doc