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

Re: [PATCH] Makefile: add help target

From
Philip Oakley <philipoakley@iee.email>
Date
Apr 8, 2022, 09:32 UTC
Message-ID
<c141359f-651f-8fea-4c95-5881c597f33c@iee.email>
In-Reply-To
<20220408074524.156165-1-gitter.spiros@gmail.com>
On 08/04/2022 08:45, Elia Pinto wrote:
Show 85 quoted lines
> Add a help target to the Makefile to be able to run make help, in the same way
> does the Makefiles self-generated by some build systems.
>
> The target list has been statically extracted from the git Makefile with a
> script and the results have been filtered in an essentially arbitrary way to
> leave the ones that i imagines most interesting and frequent for a developer.
>
> Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
> ---
> The toy script I used is here
> https://gist.github.com/devzero2000/cb887a6ba2764f7234191e560b64b7c8#file-list_targets_makefile-sh
>  Makefile | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 63 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index e8aba291d7..f6d6de2eb9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -3448,3 +3448,66 @@ $(FUZZ_PROGRAMS): all
>  		$(XDIFF_OBJS) $(EXTLIBS) git.o $@.o $(LIB_FUZZING_ENGINE) -o $@
>  
>  fuzz-all: $(FUZZ_PROGRAMS)
> +
> +# Help Target
> +help:
> +	@echo "The following are some of the valid targets for this Makefile:"
> +	@echo "... all (the default if no target is provided)"
> +	@echo "... build-perl-script"
> +	@echo "... build-python-script"
> +	@echo "... build-sh-script"
> +	@echo "... check"
> +	@echo "... check-builtins"
> +	@echo "... check-docs"
> +	@echo "... check-sha1"
> +	@echo "... clean"
> +	@echo "... clean-perl-script"
> +	@echo "... clean-python-script"
> +	@echo "... clean-sh-script"
> +	@echo "... coccicheck"
> +	@echo "... coccicheck-pending"
> +	@echo "... cocciclean"
> +	@echo "... configure"
> +	@echo "... coverage"
> +	@echo "... coverage-clean"
> +	@echo "... coverage-clean-results"
> +	@echo "... coverage-compile"
> +	@echo "... coverage-prove"
> +	@echo "... coverage-report"
> +	@echo "... coverage-test"
> +	@echo "... coverage-untested-functions"
> +	@echo "... cover_db"
> +	@echo "... cover_db_html"
> +	@echo "... cscope"
> +	@echo "... dist"
> +	@echo "... distclean"
> +	@echo "... dist-doc"
> +	@echo "... doc"
> +	@echo "... fuzz-all"
> +	@echo "... fuzz-commit-graph"
> +	@echo "... fuzz-objs"
> +	@echo "... fuzz-pack-headers"
> +	@echo "... fuzz-pack-idx"
> +	@echo "... html"
> +	@echo "... info"
> +	@echo "... install"
> +	@echo "... man"
> +	@echo "... pdf"
> +	@echo "... perf"
> +	@echo "... profile"
> +	@echo "... profile-clean"
> +	@echo "... profile-fast"
> +	@echo "... profile-fast-install"
> +	@echo "... profile-install"
> +	@echo "... quick-install-doc"
> +	@echo "... quick-install-html"
> +	@echo "... quick-install-man"
> +	@echo "... reconfigure"
> +	@echo "... rpm"
> +	@echo "... sparse"
> +	@echo "... strip"
> +	@echo "... style"
> +	@echo "... tags"
> +	@echo "... TAGS"
> +	@echo "... test"
> +.PHONY : help

Makes me realise how many areas I'm unfamiliar with, .. which is a help. ;-) -- Philip

Previous: Elia PintoNext: Taylor Blau
Message 2 of 5 in “Makefile: add help target”
  1. Makefile: add help targetElia Pinto, Apr 8, 2022
  2. Philip OakleyApr 8, 2022
  3. Taylor BlauApr 8, 2022
  4. Ævar Arnfjörð BjarmasonApr 8, 2022
  5. Junio C HamanoApr 8, 2022

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.