yambs.generate.ninja package#

Submodules#

yambs.generate.ninja.format module#

A module for writing formatting-related ninja build rules.

yambs.generate.ninja.format.final_format_targets(stream: TextIO, by_kind: dict[str, list[str]]) None[source]#

Create final, highest-level format targets.

yambs.generate.ninja.format.render_format(config: CommonConfig, paths: Iterable[Path], root: Path = None, suffix: str = '') None[source]#

Render the ninja source for formatting files.

yambs.generate.ninja.format.write_format_target(stream: TextIO, paths: Iterable[Path], suffix: str, root: Path = None) None[source]#

Write rules and targets for running clang-format on first-party sources and headers.

Module contents#

A module for working with ninja syntax.

yambs.generate.ninja.variant_phony(stream: TextIO, elfs_list: list[Path], uf2_family: str = None, wasm: bool = False)[source]#

Write variant-specific phony targets.

yambs.generate.ninja.write_continuation(stream: TextIO, offset: str) None[source]#

Write a line continuation.

yambs.generate.ninja.write_generated_phony(stream: TextIO, sources: SourceSets, src_root: Path) None[source]#

Write generated-file phony target.

Write a ‘link’ rule.

Write a ninja configuration line for an application requiring linking.

Write the application manifest and phony targets.

yambs.generate.ninja.write_phony(stream: TextIO, app_srcs: Set[Path], base: Path, board: str) None[source]#

Write the phony target.

yambs.generate.ninja.write_source_line(stream: TextIO, source: Path, base: Path, current_sources: Set[Path], board: Board, translator: SourceTranslator, board_specific: bool = False) Path[source]#

Write a ninja configuration line for a source file.