# [PATCH] Makefile: Add help target

4 messages from 2010-08-25 to 2010-08-25. Participants: Stephen Boyd, Sverre Rabbelier.
Thread: https://gitlist.dev/t/24856

## Stephen Boyd, 2010-08-25 09:51

Subject: [PATCH] Makefile: Add help target
Message-ID: <1282729913-25114-1-git-send-email-bebarino@gmail.com>
URL: https://gitlist.dev/e/1282729913-25114-1-git-send-email-bebarino%40gmail.com

```
Today I forgot whether the target was quick-install-doc or
install-quick-doc and had to open the Makefile again to find out. I'd
rather not do that and just use:

	$ make help

to get a quick summary of the interesting targets when my brain fails to
refresh. Add a help target, but don't add uninteresting things like
strip, install-gitweb, or targets which alias (install-man).

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
---

Some things I noticed:

 * make V=0 is verbose

 * sparse checking looks broken for the builtin/ directory structure

 * t/Makefile has a target for valgrind, but the toplevel makefile doesn't

 * 'make tags/TAGS/cscope' is always verbose

 * I stay up late on Tuesdays

 Makefile |   40 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index b4745a5..8c90c33 100644
--- a/Makefile
+++ b/Makefile
@@ -2307,3 +2307,43 @@ coverage-report:
 	grep '^function.*called 0 ' *.c.gcov \
 		| sed -e 's/\([^:]*\)\.gcov: *function \([^ ]*\) called.*/\1: \2/' \
 		| tee coverage-untested-functions
+
+help:
+	@echo 'Cleaning targets:'
+	@echo '  clean      - Remove generated files but keep the configure script'
+	@echo '  distclean  - Remove generated files and the configure script'
+	@echo
+	@echo 'Packaging targets:'
+	@echo '  dist       - Build git-$(GIT_VERSION).tar.gz source tarball'
+	@echo '  rpm        - Build source and binary RPM packages'
+	@echo '  dist-doc   - Build $(manpages).tar.gz and $(htmldocs).tar.gz'
+	@echo
+	@echo 'Documentation targets:'
+	@echo '  doc     - Build man pages and HTML docs'
+	@echo '  man     - Build man pages'
+	@echo '  html    - Build HTML docs'
+	@echo '  info    - Build info docs'
+	@echo '  pdf     - Build PDF docs'
+	@echo
+	@echo 'Installation targets:'
+	@echo '  install             - Install the git suite'
+	@echo '  install-doc         - Install man pages'
+	@echo '  install-html        - Install HTML docs'
+	@echo '  install-info        - Install info docs'
+	@echo '  install-pdf         - Install PDF docs'
+	@echo '  quick-install-doc   - Install pregenerated man pages from origin/man'
+	@echo '  quick-install-html  - Install pregenerated HTML pages from origin/html'
+	@echo
+	@echo 'Common targets:'
+	@echo '  all            - Build the git suite'
+	@echo '  test           - Run the git test suite'
+	@echo
+	@echo 'Other targets:'
+	@echo '  tags/TAGS      - Generate tags for editors'
+	@echo '  cscope         - Generate cscope index'
+	@echo '  coverage       - Build git with gcov support, run the test suite, and'
+	@echo '                   report untested functions'
+	@echo '  check          - Check C sources with sparse'
+	@echo
+	@echo '  make V=1 [targets] verbose build'
+	@echo
-- 
1.7.2.2.169.gb5442

```

## Sverre Rabbelier, 2010-08-25 16:27

Subject: Re: [PATCH] Makefile: Add help target
Message-ID: <AANLkTi=+f4Q6JJHfX75A57-gzBxqsdr+CrCf9Z9fqrEq@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTi%3D%2Bf4Q6JJHfX75A57-gzBxqsdr%2BCrCf9Z9fqrEq%40mail.gmail.com
In-Reply-To: <1282729913-25114-1-git-send-email-bebarino@gmail.com>

```
Heya,

On Wed, Aug 25, 2010 at 04:51, Stephen Boyd <bebarino@gmail.com> wrote:
> Today I forgot whether the target was quick-install-doc or
> install-quick-doc and had to open the Makefile again to find out. I'd
> rather not do that and just use:
>
>        $ make help
>
> to get a quick summary of the interesting targets when my brain fails to
> refresh. Add a help target, but don't add uninteresting things like
> strip, install-gitweb, or targets which alias (install-man).

Yes please, it would be even better if you're willing to make sure
that this stays up to date ;).

-- 
Cheers,

Sverre Rabbelier

```

## Stephen Boyd, 2010-08-25 21:36

Subject: Re: [PATCH] Makefile: Add help target
Message-ID: <AANLkTimSP=4bMwN_DAuDoaG5mGACYJYp2TTyDKSFY5BF@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTimSP%3D4bMwN_DAuDoaG5mGACYJYp2TTyDKSFY5BF%40mail.gmail.com
In-Reply-To: <AANLkTi=+f4Q6JJHfX75A57-gzBxqsdr+CrCf9Z9fqrEq@mail.gmail.com>

```
Hey Sverre,

On Wed, Aug 25, 2010 at 9:27 AM, Sverre Rabbelier <srabbelier@gmail.com> wrote:
> Heya,
>
> On Wed, Aug 25, 2010 at 04:51, Stephen Boyd <bebarino@gmail.com> wrote:
>> Today I forgot whether the target was quick-install-doc or
>> install-quick-doc and had to open the Makefile again to find out. I'd
>> rather not do that and just use:
>>
>>        $ make help
>>
>> to get a quick summary of the interesting targets when my brain fails to
>> refresh. Add a help target, but don't add uninteresting things like
>> strip, install-gitweb, or targets which alias (install-man).
>
> Yes please, it would be even better if you're willing to make sure
> that this stays up to date ;).
>

"Yes please" means you like it?

I'll keep an eye on the list for any interesting Makefile targets, but
no promises ;-)

```

## Sverre Rabbelier, 2010-08-25 21:39

Subject: Re: [PATCH] Makefile: Add help target
Message-ID: <AANLkTimA5YWANGRE19psyuunYLiskSoEunQmsY1UNtyc@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTimA5YWANGRE19psyuunYLiskSoEunQmsY1UNtyc%40mail.gmail.com
In-Reply-To: <AANLkTimSP=4bMwN_DAuDoaG5mGACYJYp2TTyDKSFY5BF@mail.gmail.com>

```
Heya,

On Wed, Aug 25, 2010 at 16:36, Stephen Boyd <bebarino@gmail.com> wrote:
> "Yes please" means you like it?

Indeed.

> I'll keep an eye on the list for any interesting Makefile targets, but
> no promises ;-)

That's all we can ask for right :).

-- 
Cheers,

Sverre Rabbelier

```
