From 871924189303c209285a8908b8354387aebedeb0 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Tue, 19 Mar 2024 18:14:33 +0100 Subject: GNUmakefile: help: Add a simple help It documents how to actually get the targets and variables with a pipeline. Signed-off-by: Alejandro Colomar --- GNUmakefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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: -- cgit v1.2.3