XDIFF_LIB = xdiff/lib.a
VCSSVN_LIB = vcs-svn/lib.a
-GENERATED_H += common-cmds.h command-list.h
+GENERATED_H += command-list.h
LIB_H = $(shell $(FIND) . \
-name .git -prune -o \
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \
$(filter %.o,$^) $(LIBS)
-help.sp help.s help.o: common-cmds.h command-list.h
+help.sp help.s help.o: command-list.h
-builtin/help.sp builtin/help.s builtin/help.o: common-cmds.h command-list.h GIT-PREFIX
+builtin/help.sp builtin/help.s builtin/help.o: command-list.h GIT-PREFIX
builtin/help.sp builtin/help.s builtin/help.o: EXTRA_CPPFLAGS = \
'-DGIT_HTML_PATH="$(htmldir_relative_SQ)"' \
'-DGIT_MAN_PATH="$(mandir_relative_SQ)"' \
ln -s $< $@ 2>/dev/null || \
cp $< $@
-common-cmds.h: generate-cmdlist.sh command-list.txt
-
-common-cmds.h: $(wildcard Documentation/git-*.txt)
- $(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh command-list.txt COMMON >$@+ && mv $@+ $@
-
command-list.h: generate-cmdlist.sh command-list.txt
command-list.h: $(wildcard Documentation/git-*.txt)
# Dependencies on header files, for platforms that do not support
# the gcc -MMD option.
#
-# Dependencies on automatically generated headers such as common-cmds.h or command-list.h
+# Dependencies on automatically generated headers such as command-list.h
# should _not_ be included here, since they are necessary even when
# building an object for the first time.
style:
git clang-format --style file --diff --extensions c,h
-check: common-cmds.h command-list.h
+check: command-list.h
@if sparse; \
then \
echo >&2 "Use 'make sparse' instead"; \
$(RM) $(TEST_PROGRAMS) $(NO_INSTALL)
$(RM) -r bin-wrappers $(dep_dirs)
$(RM) -r po/build/
- $(RM) *.pyc *.pyo */*.pyc */*.pyo common-cmds.h command-list.h $(ETAGS_TARGET) tags cscope*
+ $(RM) *.pyc *.pyo */*.pyc */*.pyo command-list.h $(ETAGS_TARGET) tags cscope*
$(RM) -r $(GIT_TARNAME) .doc-tmp-dir
$(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
$(RM) $(htmldocs).tar.gz $(manpages).tar.gz
uint32_t category;
};
"
-if test -z "$2"
-then
- define_categories "$1"
- echo
- print_command_list "$1"
- exit 0
-fi
-
-echo "static const char *common_cmd_groups[] = {"
-
-grps=grps$$.tmp
-match=match$$.tmp
-trap "rm -f '$grps' '$match'" 0 1 2 3 15
-
-sed -n '
- 1,/^### common groups/b
- /^### command list/q
- /^#/b
- /^[ ]*$/b
- h;s/^[^ ][^ ]*[ ][ ]*\(.*\)/ N_("\1"),/p
- g;s/^\([^ ][^ ]*\)[ ].*/\1/w '$grps'
- ' "$1"
-printf '};\n\n'
-
-n=0
-substnum=
-while read grp
-do
- echo "^git-..*[ ]$grp"
- substnum="$substnum${substnum:+;}s/[ ]$grp/$n/"
- n=$(($n+1))
-done <"$grps" >"$match"
-
-printf 'static struct cmdname_help common_cmds[] = {\n'
-grep -f "$match" "$1" |
-sed 's/^git-//' |
-sort |
-while read cmd tags
-do
- tag=$(echo "$tags" | sed "$substnum; s/[^0-9]//g")
- echo " {\"$cmd\", $(get_synopsis git-$cmd), $tag},"
-done
-echo "};"
+define_categories "$1"
+echo
+print_command_list "$1"