Skip to content

Commit 2102246

Browse files
asmellbykartben
authored andcommitted
doc: Regenerate board doc if supported hardware data changes
Declare the dts and binding files used for the supported hardware directive as dependencies of doc pages that use them. Signed-off-by: Aksel Skauge Mellbye <[email protected]>
1 parent c674723 commit 2102246

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

doc/_extensions/zephyr/domain/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,12 @@ def create_count_indicator(nodes_list, class_type, role_function=role_fn):
998998

999999
tbody += row
10001000

1001+
# Declare the dts and binding files as dependencies of the board doc page,
1002+
# ensuring that the page is rerendered if the files change.
1003+
for node in okay_nodes + disabled_nodes:
1004+
env.note_dependency(node["dts_path"])
1005+
env.note_dependency(node["binding_path"])
1006+
10011007
tgroup += tbody
10021008
table += tgroup
10031009
tables_container += table

doc/_scripts/gen_boards_catalog.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,12 @@ def get_catalog(generate_hw_features=False):
309309
node.matching_compat
310310
)
311311

312-
node_info = {"filename": str(filename), "lineno": lineno}
312+
node_info = {
313+
"filename": str(filename),
314+
"lineno": lineno,
315+
"dts_path": Path(node.filename),
316+
"binding_path": Path(node.binding_path),
317+
}
313318
node_list_key = "okay_nodes" if node.status == "okay" else "disabled_nodes"
314319

315320
if existing_feature:

0 commit comments

Comments
 (0)