git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Allow generating a non-default set of documentation
@ 2012-10-07 20:39 Junio C Hamano
  2012-10-07 21:48 ` Jeff King
  0 siblings, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2012-10-07 20:39 UTC (permalink / raw)
  To: git

By default, "make doc" generates the manpages and htmldocs in the
Documentation directory, but you may want to change this depending
on the target environment, e.g. to include 'pdf'.  Introduce a new
Makefile variable DEFAULT_DOC_TARGET to allow customizing this.

The primary motivation is to let us check documentation patches with

    $ DEFAULT_DOC_TARGET=git-push.1 make doc

but it is not so far-fetched to imagine that Windows users may want to
omit manpages with

    $ DEFAULT_DOC_TARGET=html make doc

or somesuch; this lets interested people to enhance the install-doc
target in a similar way.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---

 Makefile | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git c/Makefile w/Makefile
index 8413606..250b87a 100644
--- c/Makefile
+++ w/Makefile
@@ -299,6 +299,12 @@ all::
 #   DEFAULT_EDITOR='$GIT_FALLBACK_EDITOR',
 #   DEFAULT_EDITOR='"C:\Program Files\Vim\gvim.exe" --nofork'
 #
+# You can define DEFAULT_DOC_TARGET to something other than "all" to change it
+# from the built-in default of generating manpages and htmldocs.  e.g.
+#
+#   DEFAULT_DOC_TARGET='man html info pdf'
+#   DEFAULT_DOC_TARGET='html'
+#
 # 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
@@ -1496,6 +1502,8 @@ ifneq (,$(SOCKLEN_T))
 	BASIC_CFLAGS += -Dsocklen_t=$(SOCKLEN_T)
 endif
 
+DEFAULT_DOC_TARGET ?= all
+
 ifeq ($(uname_S),Darwin)
 	ifndef NO_FINK
 		ifeq ($(shell test -d /sw/lib && echo y),y)
@@ -2468,10 +2476,10 @@ $(XDIFF_LIB): $(XDIFF_OBJS)
 $(VCSSVN_LIB): $(VCSSVN_OBJS)
 	$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(VCSSVN_OBJS)
 
-export DEFAULT_EDITOR DEFAULT_PAGER
+export DEFAULT_EDITOR DEFAULT_PAGER DEFAULT_DOC_TARGET
 
 doc:
-	$(MAKE) -C Documentation all
+	$(MAKE) -C Documentation $(DEFAULT_DOC_TARGET)
 
 man:
 	$(MAKE) -C Documentation man

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-10-08 16:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-07 20:39 [PATCH] Allow generating a non-default set of documentation Junio C Hamano
2012-10-07 21:48 ` Jeff King
2012-10-07 22:32   ` Junio C Hamano
2012-10-07 22:45     ` Junio C Hamano
2012-10-07 23:01       ` Jeff King
2012-10-07 22:40   ` Junio C Hamano
2012-10-07 23:07     ` Jeff King
2012-10-07 23:11       ` Jeff King
2012-10-07 23:25         ` Junio C Hamano
2012-10-07 23:29           ` Jeff King
2012-10-07 23:44             ` Junio C Hamano
2012-10-08 16:33               ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).