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

Re: [PATCH] Allow generating a non-default set of documentation

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 7, 2012, 22:45 UTC
Message-ID
<7vsj9poq8v.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7v626lq5g4.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 22 quoted lines
> Jeff King <peff@peff.net> writes:
>
>> Why not do it like this:
>>
>> diff --git a/Documentation/Makefile b/Documentation/Makefile
>> index 267dfe1..ca10313 100644
>> --- a/Documentation/Makefile
>> +++ b/Documentation/Makefile
>> @@ -152,7 +152,8 @@ endif
>>  endif
>>  endif
>>  
>> -all: html man
>> +DEFAULT_DOC_TARGET ?= html man
>> +all: $(DEFAULT_DOC_TARGET)
>>  
>>  html: $(DOC_HTML)
>>  
>>
>> which covers both cases? That is also how we handle DEFAULT_TEST_TARGET.
>
> Surely, and thanks.

So here is a proposed update based on your idea, to be squashed on top (i.e. the change to the top-level Makefile in the posted patch is not reverted).

Does it make sense?
 Documentation/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git c/Documentation/Makefile w/Documentation/Makefile
index 063fa69..0f8fdf8 100644
--- c/Documentation/Makefile
+++ w/Documentation/Makefile
@@ -1,3 +1,6 @@
+# The default target of this Makefile is...
+all::
+
 MAN1_TXT= \
 	$(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
 		$(wildcard git-*.txt)) \
@@ -65,6 +68,8 @@ endif
 -include ../config.mak.autogen
 -include ../config.mak
 
+DEFAULT_DOC_TARGET ?= html man
+
 #
 # For docbook-xsl ...
 #	-1.68.1,	no extra settings are needed?
@@ -151,7 +156,7 @@ ifndef V
 endif
 endif
 
-all: html man
+all:: $(DEFAULT_DOC_TARGET)
 
 html: $(DOC_HTML)
 
Previous: Junio C HamanoNext: Jeff King
Message 4 of 12 in “Allow generating a non-default set of documentation”
  1. Allow generating a non-default set of documentationJunio C Hamano, Oct 7, 2012
  2. Jeff KingOct 7, 2012
  3. Junio C HamanoOct 7, 2012
  4. Junio C HamanoOct 7, 2012
  5. Jeff KingOct 7, 2012
  6. Junio C HamanoOct 7, 2012
  7. Jeff KingOct 7, 2012
  8. Jeff KingOct 7, 2012
  9. Junio C HamanoOct 7, 2012
  10. Jeff KingOct 7, 2012
  11. Junio C HamanoOct 7, 2012
  12. Junio C HamanoOct 8, 2012

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.