diff options
author | Sergei Poselenov <sposelenov@emcraft.com> | 2009-06-05 08:11:09 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2009-06-09 16:37:56 -0400 |
commit | 7211b8b9028854eee0d03ee6231440b7fb492521 (patch) | |
tree | bc273f884b79e2fc21c4ffad1fadfeabde59fa33 /scripts/Makefile.headersinst | |
parent | 35763e854f8aa2d579236a4670c32c078d143b3a (diff) |
kbuild: fix "Argument list too long" error for "make headers_check",
I'm trying to install kernel headers to build a cross-toolchain, but got
the following:
make ARCH=arm
INSTALL_HDR_PATH=/work/psl/eldk-builds/arm-2009-04-21/work/var/tmp/crosstool-0.43-3-root/usr/crosstool/gcc-4.2.2-glibc-20070515T2025-eldk/
+arm-linux-gnueabi/arm-linux-gnueabi/
headers_check
...
CHECK include/linux/raid (2 files)
CHECK include/linux/spi (1 files)
CHECK include/linux/sunrpc (1 files)
CHECK include/linux/tc_act (6 files)
CHECK include/linux/tc_ematch (4 files)
CHECK include/linux/usb (8 files)
make[2]: execvp: /bin/sh: Argument list too long
make[2]: ***
[/work/psl/eldk-builds/arm-2009-04-21/work/var/tmp/crosstool-0.43-3-root/usr/crosstool/gcc-4.2.2-glibc-20070515T2025-eldk/arm-linux-gnueab
+i/arm-linux-gnueabi//include/linux/.check]
Error 127
make[1]: *** [linux] Error 2
make: *** [headers_check] Error 2
->
Introduce use of xargs to fix this.
Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
Cc: Wolfgang Denk <wd@denx.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/Makefile.headersinst')
-rw-r--r-- | scripts/Makefile.headersinst | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index 095cfc8b9db..0fcd8383877 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst | |||
@@ -54,8 +54,12 @@ quiet_cmd_remove = REMOVE $(unwanted) | |||
54 | cmd_remove = rm -f $(unwanted-file) | 54 | cmd_remove = rm -f $(unwanted-file) |
55 | 55 | ||
56 | quiet_cmd_check = CHECK $(printdir) ($(words $(all-files)) files) | 56 | quiet_cmd_check = CHECK $(printdir) ($(words $(all-files)) files) |
57 | cmd_check = $(PERL) $< $(INSTALL_HDR_PATH)/include $(SRCARCH) \ | 57 | # Headers list can be pretty long, xargs helps to avoid |
58 | $(addprefix $(install)/, $(all-files)); \ | 58 | # the "Argument list too long" error. |
59 | cmd_check = for f in $(all-files); do \ | ||
60 | echo "$(install)/$${f}"; done \ | ||
61 | | xargs \ | ||
62 | $(PERL) $< $(INSTALL_HDR_PATH)/include $(SRCARCH); \ | ||
59 | touch $@ | 63 | touch $@ |
60 | 64 | ||
61 | PHONY += __headersinst __headerscheck | 65 | PHONY += __headersinst __headerscheck |