9 eval "grep -ve '^#' $exclude_programs" <"$1"
30 s/.*'"$1"' - \(.*\)/N_("\1")/
32 }' "Documentation/$1.txt"
35 define_categories () {
37 echo "/* Command categories */"
42 echo "#define CAT_$cat (1UL << $bit)"
45 test "$bit" -gt 32 && die "Urgh.. too many categories?"
48 define_category_names () {
50 echo "/* Category names */"
51 echo "static const char *category_names[] = {"
56 echo " \"$cat\", /* (1UL << $bit) */"
63 print_command_list () {
64 echo "static struct cmdname_help command_list[] = {"
69 printf " { \"$cmd\", $(get_synopsis $cmd), 0"
70 for cat in $(echo "$rest" | get_categories)
79 print_config_list () {
81 static const char *config_name_list[] = {
83 grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt Documentation/config/*.txt |
84 sed '/deprecated/d; s/::$//; s/, */\n/g' |
97 while test "--exclude-program" = "$1"
100 exclude_programs="$exclude_programs -e \"^$1 \""
104 echo "/* Automatically generated by generate-cmdlist.sh */
105 struct cmdname_help {
111 define_categories "$1"
113 define_category_names "$1"
115 print_command_list "$1"