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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]