git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH 4/7] docs: exclude documentation for commands that have been excluded
Date: Fri, 12 Apr 2019 05:00:34 -0700 (PDT)	[thread overview]
Message-ID: <31d8e43cbfaec36f662006a711b64bca47009e59.1555070430.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.168.git.gitgitgadget@gmail.com>

From: Johannes Schindelin <johannes.schindelin@gmx.de>

When building with certain build options, some commands are excluded
from the build. For example, `git-credential-cache` is skipped when
building with `NO_UNIX_SOCKETS`.

Let's not build or package documentation for those excluded commands.

This issue was pointed out rightfully when running `make check-docs` on
Windows, where we do not yet have Unix sockets, and therefore the
`credential-cache` command is excluded (yet its documentation was built
and shipped).

Note: building the documentation via `make -C Documentation` leaves the
build system with no way to determine which commands have been
excluded. If called thusly, we gracefully fail to exclude their
documentation. Only when building the documentation via the top-level
Makefile will it get excluded properly, or after building
`Documentation/GIT-EXCLUDED-PROGRAMS` manually.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 Documentation/.gitignore |  1 +
 Documentation/Makefile   |  3 +++
 Makefile                 | 36 ++++++++++++++++++++----------------
 3 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/Documentation/.gitignore b/Documentation/.gitignore
index 3ef54e0adb..ea27148c59 100644
--- a/Documentation/.gitignore
+++ b/Documentation/.gitignore
@@ -13,3 +13,4 @@ mergetools-*.txt
 manpage-base-url.xsl
 SubmittingPatches.txt
 tmp-doc-diff/
+/GIT-EXCLUDED-PROGRAMS
diff --git a/Documentation/Makefile b/Documentation/Makefile
index af0e2cf11a..e22ea2f57c 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -7,7 +7,10 @@ ARTICLES =
 SP_ARTICLES =
 OBSOLETE_HTML =
 
+-include GIT-EXCLUDED-PROGRAMS
+
 MAN1_TXT += $(filter-out \
+		$(patsubst %,%.txt,$(EXCLUDED_PROGRAMS)) \
 		$(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
 		$(wildcard git-*.txt))
 MAN1_TXT += git.txt
diff --git a/Makefile b/Makefile
index 5880d4d3a9..a5212c64bf 100644
--- a/Makefile
+++ b/Makefile
@@ -2455,22 +2455,25 @@ $(VCSSVN_LIB): $(VCSSVN_OBJS)
 
 export DEFAULT_EDITOR DEFAULT_PAGER
 
+Documentation/GIT-EXCLUDED-PROGRAMS: Makefile config.mak.uname
+	$(QUIET_GEN)echo "EXCLUDED_PROGRAMS := $(EXCLUDED_PROGRAMS)" >$@
+
 .PHONY: doc man man-perl html info pdf
-doc: man-perl
+doc: man-perl Documentation/GIT-EXCLUDED-PROGRAMS
 	$(MAKE) -C Documentation all
 
-man: man-perl
+man: man-perl Documentation/GIT-EXCLUDED-PROGRAMS
 	$(MAKE) -C Documentation man
 
 man-perl: perl/build/man/man3/Git.3pm
 
-html:
+html: Documentation/GIT-EXCLUDED-PROGRAMS
 	$(MAKE) -C Documentation html
 
-info:
+info: Documentation/GIT-EXCLUDED-PROGRAMS
 	$(MAKE) -C Documentation info
 
-pdf:
+pdf: Documentation/GIT-EXCLUDED-PROGRAMS
 	$(MAKE) -C Documentation pdf
 
 XGETTEXT_FLAGS = \
@@ -2907,33 +2910,33 @@ endif
 install-gitweb:
 	$(MAKE) -C gitweb install
 
-install-doc: install-man-perl
+install-doc: install-man-perl Documentation/GIT-EXCLUDED-PROGRAMS
 	$(MAKE) -C Documentation install
 
-install-man: install-man-perl
+install-man: install-man-perl Documentation/GIT-EXCLUDED-PROGRAMS
 	$(MAKE) -C Documentation install-man
 
-install-man-perl: man-perl
+install-man-perl: man-perl Documentation/GIT-EXCLUDED-PROGRAMS
 	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mandir_SQ)/man3'
 	(cd perl/build/man/man3 && $(TAR) cf - .) | \
 	(cd '$(DESTDIR_SQ)$(mandir_SQ)/man3' && umask 022 && $(TAR) xof -)
 
-install-html:
+install-html: Documentation/GIT-EXCLUDED-PROGRAMS
 	$(MAKE) -C Documentation install-html
 
-install-info:
+install-info: Documentation/GIT-EXCLUDED-PROGRAMS
 	$(MAKE) -C Documentation install-info
 
-install-pdf:
+install-pdf: Documentation/GIT-EXCLUDED-PROGRAMS
 	$(MAKE) -C Documentation install-pdf
 
-quick-install-doc:
+quick-install-doc: Documentation/GIT-EXCLUDED-PROGRAMS
 	$(MAKE) -C Documentation quick-install
 
-quick-install-man:
+quick-install-man: Documentation/GIT-EXCLUDED-PROGRAMS
 	$(MAKE) -C Documentation quick-install-man
 
-quick-install-html:
+quick-install-html: Documentation/GIT-EXCLUDED-PROGRAMS
 	$(MAKE) -C Documentation quick-install-html
 
 
@@ -2988,7 +2991,7 @@ artifacts-tar:: $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS) \
 htmldocs = git-htmldocs-$(GIT_VERSION)
 manpages = git-manpages-$(GIT_VERSION)
 .PHONY: dist-doc distclean
-dist-doc:
+dist-doc: Documentation/GIT-EXCLUDED-PROGRAMS
 	$(RM) -r .doc-tmp-dir
 	mkdir .doc-tmp-dir
 	$(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc
@@ -3035,6 +3038,7 @@ clean: profile-clean coverage-clean cocciclean
 	$(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
 	$(RM) $(htmldocs).tar.gz $(manpages).tar.gz
 	$(MAKE) -C Documentation/ clean
+	$(RM) Documentation/GIT-EXCLUDED-PROGRAMS
 ifndef NO_PERL
 	$(MAKE) -C gitweb clean
 	$(RM) -r perl/build/
@@ -3062,7 +3066,7 @@ ALL_COMMANDS += gitweb
 ALL_COMMANDS += git-gui git-citool
 
 .PHONY: check-docs
-check-docs::
+check-docs:: Documentation/GIT-EXCLUDED-PROGRAMS
 	$(MAKE) -C Documentation lint-docs
 	@(for v in $(patsubst %$X,%,$(ALL_COMMANDS)); \
 	do \
-- 
gitgitgadget


  parent reply	other threads:[~2019-04-12 12:00 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12 12:00 [PATCH 0/7] Assorted Documentation-related fixes Johannes Schindelin via GitGitGadget
2019-04-12 12:00 ` [PATCH 1/7] remote-testgit: move it into the support directory for t5801 Johannes Schindelin via GitGitGadget
2019-04-15  7:08   ` Junio C Hamano
2019-04-18 11:46     ` Johannes Schindelin
2019-04-12 12:00 ` [PATCH 2/7] help -a: do not list commands that are excluded from the build Johannes Schindelin via GitGitGadget
2019-04-15  7:08   ` Junio C Hamano
2019-04-18 12:06     ` Johannes Schindelin
2019-04-12 12:00 ` [PATCH 3/7] check-docs: do not pretend that commands are listed which are excluded Johannes Schindelin via GitGitGadget
2019-04-15  7:18   ` Junio C Hamano
2019-04-18 12:41     ` Johannes Schindelin
2019-04-12 12:00 ` Johannes Schindelin via GitGitGadget [this message]
2019-04-12 18:46   ` [PATCH 4/7] docs: exclude documentation for commands that have been excluded Eric Sunshine
2019-04-15  3:09     ` Junio C Hamano
2019-04-15  4:16       ` Eric Sunshine
2019-04-15  4:18         ` Eric Sunshine
2019-04-18 13:08           ` Johannes Schindelin
2019-04-15 14:50         ` Jeff King
2019-04-16  4:12           ` Junio C Hamano
2019-04-18 13:06           ` Johannes Schindelin
2019-04-18 16:01             ` Jeff King
2019-04-12 12:00 ` [PATCH 5/7] check-docs: do not bother checking for legacy scripts' documentation Johannes Schindelin via GitGitGadget
2019-04-15  7:19   ` Junio C Hamano
2019-04-12 12:00 ` [PATCH 6/7] test-tool: handle the `-C <directory>` option just like `git` Johannes Schindelin via GitGitGadget
2019-04-12 12:00 ` [PATCH 7/7] Turn `git serve` into a test helper Johannes Schindelin via GitGitGadget
2019-04-15 14:03   ` Junio C Hamano
2019-04-17  3:46     ` Jeff King
2019-04-17  5:40       ` Junio C Hamano
2019-04-17 18:22         ` Josh Steadmon
2019-04-18  1:58           ` Junio C Hamano
2019-04-18 12:17     ` Johannes Schindelin
2019-04-18 13:16 ` [PATCH v2 0/8] Assorted Documentation-related fixes Johannes Schindelin via GitGitGadget
2019-04-18 13:16   ` [PATCH v2 1/8] remote-testgit: move it into the support directory for t5801 Johannes Schindelin via GitGitGadget
2019-04-18 13:16   ` [PATCH v2 2/8] Makefile: drop the NO_INSTALL variable Johannes Schindelin via GitGitGadget
2019-04-18 13:16   ` [PATCH v2 3/8] help -a: do not list commands that are excluded from the build Johannes Schindelin via GitGitGadget
2019-04-18 13:16   ` [PATCH v2 4/8] check-docs: allow command-list.txt to contain excluded commands Johannes Schindelin via GitGitGadget
2019-04-18 13:16   ` [PATCH v2 5/8] docs: exclude documentation for commands that have been excluded Johannes Schindelin via GitGitGadget
2019-04-19  5:20     ` Junio C Hamano
2019-04-29 12:28       ` Johannes Schindelin
2019-04-18 13:16   ` [PATCH v2 6/8] check-docs: do not bother checking for legacy scripts' documentation Johannes Schindelin via GitGitGadget
2019-04-18 13:16   ` [PATCH v2 7/8] test-tool: handle the `-C <directory>` option just like `git` Johannes Schindelin via GitGitGadget
2019-04-18 13:16   ` [PATCH v2 8/8] Turn `git serve` into a test helper Johannes Schindelin via GitGitGadget

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=31d8e43cbfaec36f662006a711b64bca47009e59.1555070430.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).