kbuild: fix make headers_install when path is too long
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Mon, 29 Apr 2013 12:15:51 +0000 (14:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2014 13:42:14 +0000 (06:42 -0700)
commit3246a0352e3d58380b9386570f1db1faf7edf8a8
treec245b61ef26f1bcac2efe5aa3213b3e4df4dc272
parent45deaa3ba8c4e0767d35e979507e312ed60f17de
kbuild: fix make headers_install when path is too long

commit c0ff68f1611d6855a06d672989ad5cfea160a4eb upstream.

If headers_install is executed from a deep/long directory structure, the
shell's maximum argument length can be execeeded, which breaks the operation
with:

| make[2]: execvp: /bin/sh: Argument list too long
| make[2]: ***

Instead of passing each files name with the entire path, I give only the file
name without the source path and give this path as a new argument to
headers_install.pl.

Because there is three possible paths, I have tree input-files list, one per
path.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Tested-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Cc: Wang Nan <wangnan0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scripts/Makefile.headersinst
scripts/headers_install.sh