All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH] Allow generating a non-default set of documentation
Date: Sun, 07 Oct 2012 13:39:32 -0700	[thread overview]
Message-ID: <7vzk3yow3f.fsf@alter.siamese.dyndns.org> (raw)

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

             reply	other threads:[~2012-10-07 20:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-07 20:39 Junio C Hamano [this message]
2012-10-07 21:48 ` [PATCH] Allow generating a non-default set of documentation 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vzk3yow3f.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.