Merge branch 'sg/help-group'
[gitweb.git] / Makefile
index 323c401e966eb8a69057e563fc43b4f87e7d897f..54ec511dffb0a7b6775f360fc10deaa2008fdee9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1694,10 +1694,10 @@ $(BUILT_INS): git$X
        ln -s $< $@ 2>/dev/null || \
        cp $< $@
 
-common-cmds.h: ./generate-cmdlist.sh command-list.txt
+common-cmds.h: generate-cmdlist.perl command-list.txt
 
 common-cmds.h: $(wildcard Documentation/git-*.txt)
-       $(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@
+       $(QUIET_GEN)$(PERL_PATH) generate-cmdlist.perl command-list.txt > $@+ && mv $@+ $@
 
 SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\
        $(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\
@@ -2455,7 +2455,7 @@ check-docs::
                esac ; \
                test -f "Documentation/$$v.txt" || \
                echo "no doc: $$v"; \
-               sed -e '/^#/d' command-list.txt | \
+               sed -e '1,/^### command list/d' -e '/^#/d' command-list.txt | \
                grep -q "^$$v[  ]" || \
                case "$$v" in \
                git) ;; \
@@ -2463,7 +2463,8 @@ check-docs::
                esac ; \
        done; \
        ( \
-               sed -e '/^#/d' \
+               sed -e '1,/^### command list/d' \
+                   -e '/^#/d' \
                    -e 's/[     ].*//' \
                    -e 's/^/listed /' command-list.txt; \
                $(MAKE) -C Documentation print-man1 | \