DocBook: Do not exceed argument list limit
authorMichal Marek <mmarek@suse.cz>
Mon, 26 Jan 2015 10:31:17 +0000 (11:31 +0100)
committerJonathan Corbet <corbet@lwn.net>
Wed, 28 Jan 2015 18:33:44 +0000 (11:33 -0700)
Use find + xargs to compress the generated manpages. Without this patch,
the build can fail with

    gzip -f Documentation/DocBook/man/*.9
    /bin/bash: /usr/bin/gzip: Argument list too long

This happened with qemu user mode emulation on aarch64.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/DocBook/Makefile

index 9c7d92d03f62eb7a5a9fb3b1724e271201d41747..b6a6a2e0dd3bb69c4db3ba362e3540737ce20db0 100644 (file)
@@ -56,7 +56,7 @@ htmldocs: $(HTML)
 
 MAN := $(patsubst %.xml, %.9, $(BOOKS))
 mandocs: $(MAN)
-       $(if $(wildcard $(obj)/man/*.9),gzip -f $(obj)/man/*.9)
+       find $(obj)/man -name '*.9' | xargs gzip -f
 
 installmandocs: mandocs
        mkdir -p /usr/local/man/man9/