Re: [PATCH] Re: 'make headers_check' failed to install headers toarbitrary location

From: Sergei Poselenov
Date: Fri Jun 05 2009 - 08:11:24 EST


On Thu, 04 Jun 2009 19:07:15 +0200
Dear Wolfgang,

Wolfgang Denk <wd@xxxxxxx> wrote:

> Why not simply:
>
> for f in $(all-files); do
> echo "$(install)/$${f}"
> done | xargs $(PERL) ...
>
> ?
>

Ah,right, I missed this.

Here is the modified version of the patch, tested on 2.6.30-rc8,
ARCH=arm

Subject: [PATCH] Fixed the "Argument list too long" error for "make headers_check",
used xargs to minimize the perl calls.

Signed-off-by: Sergei Poselenov <sposelenov@xxxxxxxxxxx>
---
scripts/Makefile.headersinst | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 095cfc8..0fcd838 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -54,8 +54,12 @@ quiet_cmd_remove = REMOVE $(unwanted)
cmd_remove = rm -f $(unwanted-file)

quiet_cmd_check = CHECK $(printdir) ($(words $(all-files)) files)
- cmd_check = $(PERL) $< $(INSTALL_HDR_PATH)/include $(SRCARCH) \
- $(addprefix $(install)/, $(all-files)); \
+# Headers list can be pretty long, xargs helps to avoid
+# the "Argument list too long" error.
+ cmd_check = for f in $(all-files); do \
+ echo "$(install)/$${f}"; done \
+ | xargs \
+ $(PERL) $< $(INSTALL_HDR_PATH)/include $(SRCARCH); \
touch $@

PHONY += __headersinst __headerscheck
--
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/