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@xxxxxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html