From 3c80d83bb1f80afd30611aff708520c1d1488326 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 30 Jan 2017 23:15:48 +0000 Subject: [PATCH] linux-doc: Copy source to build directory This is necessary to avoid creating files in source directory, which makes the linux-source package unclean (and unreproducible). Firstly, Python creates bytecode files alongside the module sources. We can and do exclude those, though. Secondly, starting with 4.10, Documentation/media/Makefile converts from dot to SVG and from SVG to PDF in the source directory. These can't easily be excluded, as SVG is also used as a source format. --- debian/changelog | 2 ++ debian/rules.real | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index e9edb893f..ea8cb6d10 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,8 @@ linux (4.10~rc6-1~exp1) UNRELEASED; urgency=medium * linux-doc: Update documentation file list for 4.10 * linux-doc: Fix up symlinks to gzipped docs * debian/control: Add build-dependency on graphviz for documentation + * linux-doc: Copy source to build directory, to avoid creating files in + source directory [ Roger Shimizu ] * debian/copyright: Add GPL/X11 Dual License diff --git a/debian/rules.real b/debian/rules.real index 9685b0520..1a6dc6f8c 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -192,10 +192,11 @@ $(STAMPS_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR): $(STAMPS_DIR)/build-doc: DIR=$(BUILD_DIR)/build-doc $(STAMPS_DIR)/build-doc: $(STAMPS_DIR)/source - rm -rf $(DIR) - mkdir -p $(DIR) - +$(MAKE_CLEAN) O='$(CURDIR)/$(DIR)' xmldocs - +$(MAKE_CLEAN) O='$(CURDIR)/$(DIR)' htmldocs mandocs + mkdir -p '$(BUILD_DIR)' + rm -rf '$(DIR)' + $(call copy_source,$(DIR)) + +$(MAKE_CLEAN) -C '$(DIR)' xmldocs + +$(MAKE_CLEAN) -C '$(DIR)' htmldocs mandocs @$(stamp) install-base: