kbuild: also delete temporary directories
authorThomas Weißschuh <linux@weissschuh.net>
Wed, 18 Jan 2023 05:05:34 +0000 (05:05 +0000)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 22 Jan 2023 14:43:34 +0000 (23:43 +0900)
Reuse the standard naming schema for temporary files also for temporary
directories.

Such a directory will be used by the kheaders generation.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Tested-by: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Makefile

index ef6d593634cf5dbb3e8698d7002ac19fc729be71..05cb0ec3ea941f25f77e54649cd331dae579ae31 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2038,11 +2038,12 @@ clean: $(clean-dirs)
                -o -name '*.lex.c' -o -name '*.tab.[ch]' \
                -o -name '*.asn1.[ch]' \
                -o -name '*.symtypes' -o -name 'modules.order' \
-               -o -name '.tmp_*' \
                -o -name '*.c.[012]*.*' \
                -o -name '*.ll' \
                -o -name '*.gcno' \
-               -o -name '*.*.symversions' \) -type f -print | xargs rm -f
+               -o -name '*.*.symversions' \) -type f -print \
+               -o -name '.tmp_*' -print \
+               | xargs rm -rf
 
 # Generate tags for editors
 # ---------------------------------------------------------------------------