git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH/RFC] Makefile: add 'help' target for target summary

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Dec 13, 2011, 13:16 UTC
Message-ID
<1323782164-11759-1-git-send-email-pclouds@gmail.com>

I find this "make help" very helpful (at work, on a different project). With this I don't have to crawl through Makefile when I need something but cannot remember what's the target name. It should also help discover new targets.

We may also have "make vars" (or something like that) that shows list of user-configurable variables, basically a conversion of the big comment block near the makefile's top into a printable target.

I don't work with this Makefile much, so this is just an idea. Anyone up to turn it to something actually useful?

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 Makefile |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index ed82320..abf6cf9 100644
--- a/Makefile
+++ b/Makefile
@@ -2603,3 +2603,17 @@ profile-all: profile-clean
 	$(MAKE) CFLAGS="$(PROFILE_GEN_CFLAGS)" all
 	$(MAKE) CFLAGS="$(PROFILE_GEN_CFLAGS)" -j1 test
 	$(MAKE) CFLAGS="$(PROFILE_USE_CFLAGS)" all
+
+.PHONY: help
+
+help:
+	@echo "test		Run the test suite"
+	@echo "coverage	Build git with coverage support"
+	@echo "cover_db	Generate coverage database from *.gcov"
+	@echo "cover_db_html	Generate coverage report"
+	@echo "profile-all	Build git with profiling support"
+	@echo "clean		Clean intermediate files"
+	@echo "distclean	Clean even more for dist packaging"
+	@echo "sparse		Run git with sparse"
+	@echo "cscope		Generate cscope symbol database"
+	@echo "check-docs	Check documentation"
-- 
1.7.8.36.g69ee2
Next: Jakub Narebski
Message 1 of 2 in “Makefile: add 'help' target for target summary”
  1. Makefile: add 'help' target for target summaryNguyễn Thái Ngọc Duy, Dec 13, 2011
  2. Jakub NarebskiDec 13, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.