summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-03-19 18:14:33 +0100
committerAlejandro Colomar <alx@kernel.org>2024-03-19 18:14:35 +0100
commit871924189303c209285a8908b8354387aebedeb0 (patch)
tree5fec6343a8f4cf1678e25f6673c2d7d671ed91c6
parente4194ea338b9515f129be6a1b98d7ff8a4b29ed9 (diff)
GNUmakefile: help: Add a simple help
It documents how to actually get the targets and variables with a pipeline. Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--GNUmakefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 1602c9195..4cc4e88f0 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -37,6 +37,22 @@ $(MK):: ;
nothing:;
+.PHONY: help
+help:
+ $(info $(INFO_)To see a list of .PHONY targets, run:)
+ $(info $(INFO_) $$ make nothing -p \)
+ $(info $(INFO_) | grep '^\.PHONY:' \)
+ $(info $(INFO_) | tr ' ' '\n' \)
+ $(info $(INFO_) | grep -v '^\.PHONY:' \)
+ $(info $(INFO_) | sort;)
+ $(info )
+ $(info $(INFO_)To see a list of available variables, run:)
+ $(info $(INFO_) $$ find GNUmakefile share/mk/configure -type f \)
+ $(info $(INFO_) | xargs grep '^[^[:space:]].*=' \)
+ $(info $(INFO_) | sed 's/=.*/=/';)
+ $(info )
+
+
.DELETE_ON_ERROR:
.SILENT:
FORCE: