Messages in this thread | | | Date | Mon, 19 Jun 2023 11:32:33 +0200 | From | Eugeniu Rosca <> | Subject | Re: [PATCH] kbuild: make clean rule robust against too long argument error |
| |
Hello Yamada-san,
On Mon, Jun 19, 2023 at 12:50:48AM +0900, Masahiro Yamada wrote: > On Sun, Jun 18, 2023 at 5:07 AM Eugeniu Rosca <erosca@de.adit-jv.com> wrote:
[snip]
> > Please, correct me if I am wrong, but it looks like the magic/brilliance > > is in the 'patsubst' function, since below version also fails for me: > > > > NOK: cmd_clean = printf '%s ' $(__clean-files) | xargs rm -rf > > Right. > Now, 'printf' (instead of 'rm') failed with the too long argument list. > > GNU Make does not have the length limit, but shell does. > So, the full-path list must be passed via stdout > instead of the command line. > > > The comment might be confusing. > > I will repeat the same comment written in scripts/Makefile.build: > > # To make this rule robust against "Argument list too long" error, > # remove $(obj)/ prefix, and restore it by a shell command.
Sounds good to me. No open questions from my end :)
-- Best regards, Eugeniu Rosca
| |