diff mbox

DocBook: Do not exceed argument list limit

Message ID 1422268277-5333-1-git-send-email-mmarek@suse.cz (mailing list archive)
State New, archived
Headers show

Commit Message

Michal Marek Jan. 26, 2015, 10:31 a.m. UTC
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>
---
 Documentation/DocBook/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Randy Dunlap Jan. 27, 2015, 1:36 a.m. UTC | #1
Adding Mr. Corbet.

On 01/26/15 02:31, Michal Marek wrote:
> 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>
> ---
>  Documentation/DocBook/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
> index 9c7d92d..b6a6a2e 100644
> --- a/Documentation/DocBook/Makefile
> +++ b/Documentation/DocBook/Makefile
> @@ -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/
>
Jonathan Corbet Jan. 28, 2015, 7 p.m. UTC | #2
On Mon, 26 Jan 2015 11:31:17 +0100
Michal Marek <mmarek@suse.cz> wrote:

> 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

That is a lot of files in that directory these days...applied to the docs
tree, thanks.

jon
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 9c7d92d..b6a6a2e 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -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/