kbuild: remove clean-dirs syntax

The only the difference between clean-files and clean-dirs is the -r
option passed to the 'rm' command.

You can always pass -r, and then remove the clean-dirs syntax.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
Masahiro Yamada
2019-08-25 10:31:27 +09:00
parent 36de077b20
commit 1634f2bfdb
4 changed files with 8 additions and 30 deletions

View File

@@ -115,6 +115,4 @@ header-test-y += $(filter-out $(header-test-), \
$(patsubst $(obj)/%,%, $(wildcard \
$(addprefix $(obj)/, *.h */*.h */*/*.h */*/*/*.h))))
# For GNU Make <= 4.2.1, $(wildcard $(obj)/*/) matches to not only directories
# but also regular files. Use $(filter %/, ...) just in case.
clean-dirs += $(patsubst $(obj)/%/,%,$(filter %/, $(wildcard $(obj)/*/)))
clean-files += $(filter-out Makefile, $(notdir $(wildcard $(obj)/*)))