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

Re: [PATCHv3] Makefile: implement help target

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Sep 30, 2010, 07:08 UTC
Message-ID
<4CA43765.5010804@drmicha.warpmail.net>
In-Reply-To
<7vbp7gmggy.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 09/29/2010 10:39 PM:
Show 11 quoted lines
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
>> diff --git a/Makefile b/Makefile
>> index db2efd6..371214d 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1,4 +1,10 @@
>>  # The default target of this Makefile is...
>> +help-Build::
> 
> Heh, no way.  The default target of this Makefile should remain "all".

Damnit, that wasn't intended.... But that's solved by a simple reordering, of course.

> Even though letting phony double-colon rules to implicitly collect members
> of groups and showing them is a neat idea, I do not think "make -j help"
> would do what you are expecting ;-)

I expect a randomly ordered mess, and "make -j help" fully meets those expectations! Can "-j" be set in the environment or config.mak somehow? Otherwise I think that explicitly shooting yourself in the foot should be allowed...

Anyway, this topic is (only) about help on our Makefile, and I think that as long as we don't want to go several extra miles, we have to decide between two app roaches :)

* comment based:
  + readable
  + -j safe
  - no var expansion (that I know of, at least without recursive make)
  +- single line comments (unless more perl/awk foo is invested)
  +- either in Makefile order or lexically sorted (or more perl lines)
* phony :: rules based:
  +- somewhat less readable
  - not -j safe
  + var expansion
  + multi line comments (could easily add a 3rd level also)
  + categories can be ordered freely (targets in Makefile order within)
Michael
Previous: Junio C HamanoNext: yj2133011
Message 23 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.