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.
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.
- yambs.generate.ninja.write_link(stream: TextIO, output: Path, entry_object: Path, outputs: Set[Path], wasm: bool = False) None [source]#
Write a ‘link’ rule.
- yambs.generate.ninja.write_link_line(stream: TextIO, source: Path, base: Path, board: Board, sources: SourceSets) None [source]#
Write a ninja configuration line for an application requiring linking.
- yambs.generate.ninja.write_link_lines(stream: TextIO, src_root: Path, board: Board, sources: SourceSets) None [source]#
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.