[v3,1/2] kbuild: also delete temporary directories

Message ID 20230117-kernel-kheaders-gitignore-v3-1-d67d649dd990@weissschuh.net
State New
Headers
Series kheaders: use standard naming for the temporary directory |

Commit Message

Thomas Weißschuh Jan. 18, 2023, 5:04 a.m. UTC
  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>
---
 Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Patch

diff --git a/Makefile b/Makefile
index e09fe100efb2..863b3fdd4374 100644
--- a/Makefile
+++ b/Makefile
@@ -2026,11 +2026,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
 # ---------------------------------------------------------------------------