Thread (2 messages) 2 messages, 2 authors, 2016-06-15

Re: [PATCHv3] Makefile: implement help target

From: Michael J Gruber <hidden>
Date: 2016-06-15 22:49:39

Junio C Hamano venit, vidit, dixit 09/29/2010 10:39 PM:
Michael J Gruber [off-list ref] writes:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help