Skip to content

Commit

Permalink
[tools] docs.modm.io generator: Exclude unused architecture modules
Browse files Browse the repository at this point in the history
  • Loading branch information
rleh committed Mar 17, 2020
1 parent 1a68270 commit 8194b88
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/scripts/docs_modm_io_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,15 @@ def create_target(argument):
builder = lbuild.api.Builder(options=options)
builder.load([Path(modm_path) / "repo.lb", Path(modm_path) / "test/repo.lb"])
modules = sorted(builder.parser.modules.keys())

# Only allow the first board module to be built (they overwrite each others files)
first_board = next((m for m in modules if ":board:" in m), None)
modules = [m for m in modules if ":board" not in m or m == first_board]

# Remove :architecture modules. Only the :architecture modules for which actual implementations
# exist are include as dependencies of the :platform modules.
modules = [m for m in modules if ":architecture" not in m]

builder.build(device, modules)

print('Executing: (cd {}/modm/docs/ && doxypress doxypress.json)'.format(device))
Expand Down

0 comments on commit 8194b88

Please sign in to comment.