1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-05 15:45:53 +01:00

Merge pull request #701 from cgwalters/minor-local-buildstuff2

build-sys: Generalize manpage bits to `make update-generated`
This commit is contained in:
John Eckersberg
2024-07-17 14:31:55 -04:00
committed by GitHub
2 changed files with 11 additions and 6 deletions

View File

@@ -47,6 +47,10 @@ validate: validate-rust
ruff check
.PHONY: validate
update-generated:
cargo xtask update-generated
.PHONY: update-generated
vendor:
cargo xtask $@
.PHONY: vendor

View File

@@ -19,7 +19,7 @@ fn main() {
#[allow(clippy::type_complexity)]
const TASKS: &[(&str, fn(&Shell) -> Result<()>)] = &[
("manpages", manpages),
("man2markdown", man2markdown),
("update-generated", update_generated),
("package", package),
("package-srpm", package_srpm),
("spec", spec),
@@ -115,12 +115,13 @@ fn manpages(sh: &Shell) -> Result<()> {
Ok(())
}
/// Generate markdown files (converted from the man pages, which are generated
/// from the Rust sources) into docs/src, which ends up in the rendered
/// documentation. This process is currently manual.
#[context("man2markdown")]
fn man2markdown(sh: &Shell) -> Result<()> {
/// Update generated files, such as converting the man pages to markdown.
/// This process is currently manual.
#[context("Updating generated files")]
fn update_generated(sh: &Shell) -> Result<()> {
manpages(sh)?;
// And convert the man pages into markdown, so they can be included
// in the docs.
for ent in std::fs::read_dir("target/man")? {
let ent = ent?;
let path = &ent.path();