summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-03-25 21:41:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-01 05:01:06 (GMT)
commit057ccba593142e23338d9ff7409ab1cf20f25654 (patch)
treeb72ae3050e3d05cd635011379bf8e0a63be60780 /Makefile
parentc3eaa0cb9d69988d69253ea4c42fe6f03d291da6 (diff)
downloadgit-057ccba593142e23338d9ff7409ab1cf20f25654.zip
git-057ccba593142e23338d9ff7409ab1cf20f25654.tar.gz
git-057ccba593142e23338d9ff7409ab1cf20f25654.tar.bz2
check-docs: really look at the documented commands again
As part of the `check-docs` target, we verify that commands that are documented are actually in the current list of commands to be built. However, this logic broke in 5fafce0b78 (check-docs: get documented command list from Makefile, 2012-08-08), when we tried to make the logic safer by not looking at the files in the worktree, but at the list of files to be generated in `Documentation/Makefile`. While this was the right thing to do, it failed to accommodate for the fact that `make -C Documentation/ print-man1`, unlike `ls Documentation/*.txt`, would *not* print lines starting with the prefix `Documentation/`. At long last, let's fix this. Note: This went undetected due to a funny side effect of the `ALL_PROGRAMS` variable starting with a space. That space, together with the extra space we inserted before `$(ALL_PROGRAMS)` in the case " $(ALL_PROGRAMS)" in *" $$cmd ") [...] construct, is responsible that this case arm is used when `cmd` is empty (which was clearly not intended to be the case). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index c524094..7bcb66f 100644
--- a/Makefile
+++ b/Makefile
@@ -3082,7 +3082,7 @@ check-docs::
-e 's/^/listed /' command-list.txt; \
$(MAKE) -C Documentation print-man1 | \
grep '\.txt$$' | \
- sed -e 's|Documentation/|documented |' \
+ sed -e 's|^|documented |' \
-e 's/\.txt//'; \
) | while read how cmd; \
do \