@matheusbsbs / matheus-bagliano / commits / 3f7ce648fa
Fork 0

Make check-docs target detect removed commands

The maintainer should remember running "make check-docs" from time to time. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Nov 8, 2007 at 18:38 UTC 3f7ce648fafead8c9cb5f6f594a0eb220fc12c9c
1 file changed +27 -3
Makefile
+27 -3
@@ -1126,12 +1126,13 @@ endif
1126 ### Check documentation
1127 #
1128 check-docs::
1129 - @for v in $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk; \
1129 + @(for v in $(ALL_PROGRAMS) $(BUILT_INS) git gitk; \
1130 do \
1131 case "$$v" in \
1132 git-merge-octopus | git-merge-ours | git-merge-recursive | \
1133 - git-merge-resolve | git-merge-stupid | \
1133 + git-merge-resolve | git-merge-stupid | git-merge-subtree | \
1134 git-add--interactive | git-fsck-objects | git-init-db | \
1135 + git-rebase--interactive | \
1136 git-repo-config | git-fetch--tool ) continue ;; \
1137 esac ; \
1138 test -f "Documentation/$$v.txt" || \
@@ -1142,7 +1143,30 @@ check-docs::
1143 git) ;; \
1144 *) echo "no link: $$v";; \
1145 esac ; \
1145 - done | sort
1146 + done; \
1147 + ( \
1148 + sed -e '1,/^__DATA__/d' \
1149 + -e 's/[ ].*//' \
1150 + -e 's/^/listed /' Documentation/cmd-list.perl; \
1151 + ls -1 Documentation/git*txt | \
1152 + sed -e 's|Documentation/|documented |' \
1153 + -e 's/\.txt//'; \
1154 + ) | while read how cmd; \
1155 + do \
1156 + case "$$how,$$cmd" in \
1157 + *,git-citool | \
1158 + *,git-gui | \
1159 + documented,gitattributes | \
1160 + documented,gitignore | \
1161 + documented,gitmodules | \
1162 + documented,git-tools | \
1163 + sentinel,not,matching,is,ok ) continue ;; \
1164 + esac; \
1165 + case " $(ALL_PROGRAMS) $(BUILT_INS) git gitk " in \
1166 + *" $$cmd "*) ;; \
1167 + *) echo "removed but $$how: $$cmd" ;; \
1168 + esac; \
1169 + done ) | sort
1170
1171 ### Make sure built-ins do not have dups and listed in git.c
1172 #