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

Re: [PATCHv2] Makefile: implement help target

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Sep 29, 2010, 08:06 UTC
Message-ID
<4CA2F36D.2010901@drmicha.warpmail.net>
In-Reply-To
<r6bnW3ubJQeOuXWFRPisJu1hXBq3kXeHCvNe10M00ZM@cipher.nrlssc.navy.mil>
Brandon Casey venit, vidit, dixit 29.09.2010 00:00:
Show 35 quoted lines
> On 09/28/2010 03:38 PM, Michael J Gruber wrote:
>> with automatic help text collection from lines starting with "# Help: " and
>> preceding a make target.
>>
>> Suggested-by: Stephen Boyd <bebarino@gmail.com>
>> Helped-by: Andreas Ericsson <andreas.ericsson@op5.se>
>> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
>> ---
>> Now how's this for portability and such? New output:
>>
>> Build targets:
>>     all:                Build the Git suite
>>     dist:               Build git-$(GIT_VERSION).tar.gz source
>>     dist-doc:           Build $(manpages).tar.gz and $(htmldocs).tar.gz
> <snip>
> 
>>  Makefile |   43 +++++++++++++++++++++++++++++++++++++++++--
>>  1 files changed, 41 insertions(+), 2 deletions(-)
> 
> 
> Very nice.  Too bad we have more targets than fit in my 33-line terminal.
> 
> /bikeshed
> 
> How about this micro-tweak:
> 
>   1) Remove the colon from the targets so they sort correctly.
>      i.e. so "dist" sorts before "dist-doc" and "install" sorts
>           before "install-*"
>   2) Add " - " prefix to description strings and reduce target
>      width accordingly so we still have just as much room for
>      the description string.
> 
> So the output looks like this:
> 
....
Show 10 quoted lines
> Install targets:
>     install            - Install the Git suite
>     install-doc        - Install man pages
>     install-html       - Install HTML docs
>     install-info       - Install info docs
>     install-man        - Install man pages
>     install-pdf        - Install PDF docs
>     quick-install-doc  - Install pregenerated man pages from origin/man
>     quick-install-html - Install pregenerated HTML pages from origin/html
>     quick-install-man  - Install pregenerated man pages from origin/man

Sounds good, although the sort order depends on the locale. "LANG=C sort" takes care of that.

> Oh, by the way, tested and works on Solaris 10 and IRIX 6.5.

Thanks! Michael

Previous: Brandon CaseyNext: Jeff King
Message 16 of 24 in “Makefile: Add help target”
  1. Makefile: Add help targetStephen Boyd, Sep 28, 2010
  2. Junio C HamanoSep 28, 2010
  3. Sverre RabbelierSep 28, 2010
  4. Andreas EricssonSep 28, 2010
  5. Makefile: implement help targetMichael J Gruber, Sep 28, 2010
  6. Sverre RabbelierSep 28, 2010
  7. Zbyszek SzmekSep 28, 2010
  8. Ævar Arnfjörð BjarmasonSep 28, 2010
  9. Junio C HamanoSep 28, 2010
  10. Michael J GruberSep 28, 2010
  11. Ævar Arnfjörð BjarmasonSep 28, 2010
  12. [PATCHv2] Makefile: implement help targetMichael J Gruber, Sep 28, 2010
  13. Sverre RabbelierSep 28, 2010
  14. Jakub NarebskiSep 28, 2010
  15. Brandon CaseySep 28, 2010
  16. Michael J GruberSep 29, 2010
  17. Jeff KingSep 29, 2010
  18. Michael J GruberSep 29, 2010
  19. Jeff KingSep 29, 2010
  20. Junio C HamanoSep 29, 2010
  21. [PATCHv3] Makefile: implement help targetMichael J Gruber, Sep 29, 2010
  22. Junio C HamanoSep 29, 2010
  23. Michael J GruberSep 30, 2010
  24. yj2133011Sep 29, 2010

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.