summaryrefslogtreecommitdiff
path: root/generate-cmdlist.sh
diff options
context:
space:
mode:
Diffstat (limited to 'generate-cmdlist.sh')
-rwxr-xr-xgenerate-cmdlist.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh
index 8d6d8b4..fa1e547 100755
--- a/generate-cmdlist.sh
+++ b/generate-cmdlist.sh
@@ -76,6 +76,23 @@ print_command_list () {
echo "};"
}
+print_config_list () {
+ cat <<EOF
+static const char *config_name_list[] = {
+EOF
+ grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt |
+ sed '/deprecated/d; s/::$//; s/, */\n/g' |
+ sort |
+ while read line
+ do
+ echo " \"$line\","
+ done
+ cat <<EOF
+ NULL,
+};
+EOF
+}
+
echo "/* Automatically generated by generate-cmdlist.sh */
struct cmdname_help {
const char *name;
@@ -88,3 +105,5 @@ echo
define_category_names "$1"
echo
print_command_list "$1"
+echo
+print_config_list