From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Jeff King <peff@peff.net>
Subject: [PATCH v2 1/2] Allow generating a non-default set of documentation
Date: Thu, 3 Jan 2013 11:05:19 -0800 [thread overview]
Message-ID: <1357239920-2201-2-git-send-email-gitster@pobox.com> (raw)
In-Reply-To: <1357239920-2201-1-git-send-email-gitster@pobox.com>
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. It won't be useful without additional support to tweak
the format installed by default via DEFAULT_DOC_INSTALL_TARGET, though.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Documentation/Makefile | 7 ++++++-
Makefile | 10 +++++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 063fa69..0f8fdf8 100644
--- a/Documentation/Makefile
+++ b/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)
diff --git a/Makefile b/Makefile
index 6b0c961..71655a7 100644
--- a/Makefile
+++ b/Makefile
@@ -281,6 +281,12 @@ all::
# DEFAULT_EDITOR='$GIT_FALLBACK_EDITOR',
# DEFAULT_EDITOR='"C:\Program Files\Vim\gvim.exe" --nofork'
#
+# You can define DEFAULT_DOC_TARGET 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
@@ -1421,6 +1427,8 @@ ifneq (,$(SOCKLEN_T))
BASIC_CFLAGS += -Dsocklen_t=$(SOCKLEN_T)
endif
+DEFAULT_DOC_TARGET ?= html man
+
ifeq ($(uname_S),Darwin)
ifndef NO_FINK
ifeq ($(shell test -d /sw/lib && echo y),y)
@@ -2371,7 +2379,7 @@ $(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
--
1.8.1.293.g4a210a9
next prev parent reply other threads:[~2013-01-03 19:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-03 19:05 [PATCH v2 0/2] DEFAULT_DOC_TARGET Junio C Hamano
2013-01-03 19:05 ` Junio C Hamano [this message]
2013-01-03 19:05 ` [PATCH v2 2/2] Allow installing a non-default set of documentation Junio C Hamano
2013-01-03 20:32 ` [PATCH v2 0/2] DEFAULT_DOC_TARGET Jeff King
2013-01-03 20:37 ` Jeff King
2013-01-03 21:05 ` Jeff King
2013-01-03 21:07 ` Jeff King
2013-01-03 22:20 ` Junio C Hamano
2013-01-03 22:25 ` Jeff King
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=1357239920-2201-2-git-send-email-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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 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).