kbuild: make clean rule robust against too long argument error
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 17 Jun 2023 15:30:25 +0000 (00:30 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 25 Jun 2023 14:12:20 +0000 (23:12 +0900)
commit3602906019a68c340b69991bb4020e10374fb0d0
treed25f5ca7a7b6c3a9e94b8df02a051262d2bd0323
parent1fffe7a34c89b12b58f88b280bc10ce034477c3a
kbuild: make clean rule robust against too long argument error

Commit cd968b97c492 ("kbuild: make built-in.a rule robust against too
long argument error") made a build rule robust against "Argument list
too long" error.

Eugeniu Rosca reported the same error occurred when cleaning an external
module.

The $(obj)/ prefix can be a very long path for external modules.

Apply a similar solution to 'make clean'.

Reported-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Tested-by: Eugeniu Rosca <erosca@de.adit-jv.com>
scripts/Makefile.clean