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

[PATCH v2 2/2] Allow installing a non-default set of documentation

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 3, 2013, 19:05 UTC
Message-ID
<1357239920-2201-3-git-send-email-gitster@pobox.com>
In-Reply-To
<1357239920-2201-1-git-send-email-gitster@pobox.com>

In a fashion similar to the previous DEFAULT_DOC_TARGET patch, teach the build procedure to allow installing the documentation sets specified via DEFAULT_DOC_INSTALL_TARGET.

These two symbols must be separate, as we should allow formatting more than what will be installed. The default has been to format both html and manpages, and to install only the latter.

    $ make DEFAULT_DOC_INSTALL_TARGET='html man' install-doc
will format and install both html and manpages.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/Makefile | 3 ++-
 Makefile               | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 0f8fdf8..bd7800d 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -69,6 +69,7 @@ endif
 -include ../config.mak
 
 DEFAULT_DOC_TARGET ?= html man
+DEFAULT_DOC_INSTALL_TARGET ?= $(DEFAULT_DOC_TARGET)
 
 #
 # For docbook-xsl ...
@@ -171,7 +172,7 @@ info: git.info gitman.info
 
 pdf: user-manual.pdf
 
-install: install-man
+install: $(patsubst %,install-%,$(DEFAULT_DOC_INSTALL_TARGET))
 
 install-man: man
 	$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
diff --git a/Makefile b/Makefile
index 71655a7..422a15f 100644
--- a/Makefile
+++ b/Makefile
@@ -287,6 +287,8 @@ all::
 #   DEFAULT_DOC_TARGET='man html info pdf'
 #   DEFAULT_DOC_TARGET='html'
 #
+# DEFAULT_DOC_INSTALL_TARGET can be used in a similar way.
+#
 # Define COMPUTE_HEADER_DEPENDENCIES to "yes" if you want dependencies on
 # header files to be automatically computed, to avoid rebuilding objects when
 # an unrelated header file changes.  Define it to "no" to use the hard-coded
@@ -1428,6 +1430,7 @@ ifneq (,$(SOCKLEN_T))
 endif
 
 DEFAULT_DOC_TARGET ?= html man
+DEFAULT_DOC_INSTALL_TARGET ?= man
 
 ifeq ($(uname_S),Darwin)
 	ifndef NO_FINK
@@ -2379,7 +2382,7 @@ $(XDIFF_LIB): $(XDIFF_OBJS)
 $(VCSSVN_LIB): $(VCSSVN_OBJS)
 	$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(VCSSVN_OBJS)
 
-export DEFAULT_EDITOR DEFAULT_PAGER DEFAULT_DOC_TARGET
+export DEFAULT_EDITOR DEFAULT_PAGER DEFAULT_DOC_TARGET DEFAULT_DOC_INSTALL_TARGET
 
 doc:
 	$(MAKE) -C Documentation all
-- 
1.8.1.293.g4a210a9
Previous: Junio C HamanoNext: Jeff King
Message 3 of 9 in “DEFAULT_DOC_TARGET”
  1. 0/2 DEFAULT_DOC_TARGETJunio C Hamano, Jan 3, 2013
  2. 1/2 Allow generating a non-default set of documentationJunio C Hamano, Jan 3, 2013
  3. 2/2 Allow installing a non-default set of documentationJunio C Hamano, Jan 3, 2013
  4. Jeff KingJan 3, 2013
  5. Jeff KingJan 3, 2013
  6. Jeff KingJan 3, 2013
  7. Jeff KingJan 3, 2013
  8. Junio C HamanoJan 3, 2013
  9. Jeff KingJan 3, 2013

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.