Update 'DocBook: Make Documentation/DocBook -j clean' to be suitable for upstream

svn path=/dists/trunk/linux/; revision=20691
This commit is contained in:
Ben Hutchings 2013-09-30 01:07:52 +00:00
parent 59b15e7823
commit cc87a96da2
2 changed files with 22 additions and 9 deletions

View File

@ -1,20 +1,33 @@
From: Bastian Blank <waldi@debian.org>
Subject: DocBook: Make Documentation/DocBook -j clean
Date: Tue, 14 Jun 2006 00:05:06 +0200
Forwarded: no
From: Ben Hutchings <ben@decadent.org.uk>
Date: Mon, 30 Sep 2013 01:51:23 +0100
Subject: DocBook: Make mandocs parallel-safe
Forwarded: http://mid.gmane.org/1380502603.14493.9.camel@deadeye.wl.decadent.org.uk
Two concurrent calls to cmd_db2man may attempt to compress manual
pages generated by each other. gzip can then fail due to an input
file having already been compressed and removed.
Since dh_compress will compress manual pages later, we don't need
to run gzip here at all.
Move the gzip command to the top-level mandocs target.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Bastian Blank <waldi@debian.org>
---
Documentation/DocBook/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 5a2882d..71c7077 100644
index bc3d9f8..b07b5f3 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -146,7 +146,7 @@ quiet_cmd_db2html = HTML $@
@@ -54,6 +54,7 @@ htmldocs: $(HTML)
MAN := $(patsubst %.xml, %.9, $(BOOKS))
mandocs: $(MAN)
+ $(if $(wildcard $(obj)/man/*.9),gzip -f $(obj)/man/*.9)
installmandocs: mandocs
mkdir -p /usr/local/man/man9/
@@ -159,7 +160,7 @@ quiet_cmd_db2html = HTML $@
cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi
quiet_cmd_db2man = MAN $@

2
debian/rules.real vendored
View File

@ -204,7 +204,7 @@ install-manual: DH_OPTIONS = -p$(PACKAGE_NAME)
install-manual: $(STAMPS_DIR)/build-doc
dh_prep
set -o pipefail; \
find $(DIR)/Documentation/DocBook/man/ -name '*.9' | xargs dh_installman
find $(DIR)/Documentation/DocBook/man/ -name '*.9.gz' | xargs dh_installman
+$(MAKE_SELF) install-base
install-headers_$(ARCH): PACKAGE_NAMES = linux-headers-$(ABINAME)-all linux-headers-$(ABINAME)-all-$(ARCH)