summaryrefslogtreecommitdiff
path: root/tools/binman/entry.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-08-07 16:33:25 -0600
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-08-13 11:09:49 +0200
commit228c9b862923782ec3a01d5fd97ee38b8c8db4e0 (patch)
tree6c61980065aea2bac3451bb8388c8b9a35e1c020 /tools/binman/entry.py
parent37c42b7270597fea321d23ac1b079c0487c95302 (diff)
binman: Add rST references for binman entry types
Add references in the documentation for each entry type, so we can refer to them from other documentation. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r--tools/binman/entry.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index a07a5888643..e3767aefa73 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -750,6 +750,11 @@ features to produce new behaviours.
first_line = lines[0]
rest = [line[4:] for line in lines[1:]]
hdr = 'Entry: %s: %s' % (name.replace('_', '-'), first_line)
+
+ # Create a reference for use by rST docs
+ ref_name = f'etype_{module.__name__[6:]}'.lower()
+ print('.. _%s:' % ref_name)
+ print()
print(hdr)
print('-' * len(hdr))
print('\n'.join(rest))