Commit 35360df9 authored by Anas Nashif's avatar Anas Nashif Committed by Anas Nashif
Browse files

doc: index config variable only once



The index.rst file should reference variables only once.

Jira: ZEP-148
Change-Id: Ia5aad1d3ccd0f7c93fca94f1fa0ad88171eaf5c1
Signed-off-by: default avatarAnas Nashif <anas.nashif@intel.com>
parent e8bc8af6
Loading
Loading
Loading
Loading
+15 −12
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ UNKNOWN, BOOL, TRISTATE, STRING, HEX, INT = range(6)
TYPENAME = {UNKNOWN: "unknown", BOOL: "bool", TRISTATE: "tristate",
            STRING: "string", HEX: "hex", INT: "int"}

done = []

def print_with_indent(s, indent):
    print((" " * indent) + s)
@@ -28,6 +29,8 @@ def print_items(items, outdir, indent):
            #print_with_indent("config {0}".format(item.get_name()), indent)

            var = "CONFIG_%s" %item.get_name()
            if not var in done:
                done.append(var)
                f.write("     %s.rst\n" %var)
                config = open("%s/%s.rst" % (outdir, var), "w")
                config.write("\n.. _CONFIG_%s:\n" %item.get_name())