note makefile help

This commit is contained in:
Malin Freeborn 2025-02-09 22:20:16 +01:00
parent 2250275be5
commit 6b4a846284
Signed by: andonome
GPG Key ID: 52295D2377F4D70F
2 changed files with 20 additions and 0 deletions

View File

@ -183,3 +183,5 @@ In this case, the makefile can see that `backup` depends on the current backup f
- [File patterns](Makefiles/patterns.md)
- [Makefile graphs](Makefiles/graph-easy.md)
- [In-build help](Makefiles/help.md)
- [Makefile graphs](Makefiles/graph-easy.md)

18
system/Makefiles/help.md Normal file
View File

@ -0,0 +1,18 @@
---
title: "Makefiles"
tags: [ "system", "makefiles", "help" ]
---
Make your first target 'help' to give an overview of the main targets.
Running `make help` will search for text which starts with `## ` and show what that target does.
```make
help: ## Print the help message
@awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \
sort | \
column -s ':' -t
clean: ## Remove generated files
$(RM) $(defaults)
```