From: Ben Hutchings Date: Wed, 6 Nov 2013 21:18:30 +0000 (-0800) Subject: DocBook: Make mandocs parallel-safe X-Git-Tag: v3.14-rc1~128^2~35 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=832919bfcf0cfd75767c68b0c61f7cf48be860a8;p=linux.git DocBook: Make mandocs parallel-safe 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. Move the gzip command to the top-level mandocs target. Signed-off-by: Ben Hutchings Cc: Bastian Blank Acked-by: Rob Landley Signed-off-by: Jiri Kosina --- diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 5cf621b78c5e..0f9c6ff41aac 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile @@ -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 $@ - cmd_db2man = if grep -q refentry $<; then xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; gzip -f $(obj)/man/*.9; fi + cmd_db2man = if grep -q refentry $<; then xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; fi %.9 : %.xml @(which xmlto > /dev/null 2>&1) || \ (echo "*** You need to install xmlto ***"; \