summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-04-14 16:50:43 +0200
committerAlejandro Colomar <alx@kernel.org>2023-04-19 23:37:23 +0200
commit856cd402132afc7e84b6145c61bdb1ed40de21c4 (patch)
treeb8635f669075fc23d73af73f9e670ea77fc01118
parent3bf446018179a9639416e37477e2c257f73d9942 (diff)
*.mk: clean: Remove $builddir
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--Makefile2
-rw-r--r--share/mk/build/_.mk6
-rw-r--r--share/mk/cmd.mk1
3 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 01556eb..a1f75ed 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,8 @@ all:
help:
$(info all No-op)
$(info )
+ $(info clean Remove $$(builddir))
+ $(info )
$(info lint Alias for "lint-sh")
$(info lint-sh Alias for "lint-sh-shellcheck")
$(info lint-sh-shellcheck Lint the shell script with shellcheck(1))
diff --git a/share/mk/build/_.mk b/share/mk/build/_.mk
index 5b5bc07..7071e9c 100644
--- a/share/mk/build/_.mk
+++ b/share/mk/build/_.mk
@@ -18,4 +18,10 @@ $(builddir)/%/:
+$(MKDIR) $@
+.PHONY: clean
+clean:
+ $(info RM -rf $(builddir))
+ $(RM) -rf $(builddir)
+
+
endif # include guard
diff --git a/share/mk/cmd.mk b/share/mk/cmd.mk
index 470b764..6855d8b 100644
--- a/share/mk/cmd.mk
+++ b/share/mk/cmd.mk
@@ -6,6 +6,7 @@ MAKEFILE_CMD_INCLUDED := 1
MKDIR := mkdir -p
+RM := rm
SHELLCHECK := shellcheck