Skip to content

Commit 5366cfc

Browse files
authored
Merge pull request #701 from cgwalters/minor-local-buildstuff2
build-sys: Generalize manpage bits to `make update-generated`
2 parents 64a344d + 9b95833 commit 5366cfc

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ validate: validate-rust
4747
ruff check
4848
.PHONY: validate
4949

50+
update-generated:
51+
cargo xtask update-generated
52+
.PHONY: update-generated
53+
5054
vendor:
5155
cargo xtask $@
5256
.PHONY: vendor

xtask/src/xtask.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn main() {
1919
#[allow(clippy::type_complexity)]
2020
const TASKS: &[(&str, fn(&Shell) -> Result<()>)] = &[
2121
("manpages", manpages),
22-
("man2markdown", man2markdown),
22+
("update-generated", update_generated),
2323
("package", package),
2424
("package-srpm", package_srpm),
2525
("spec", spec),
@@ -115,12 +115,13 @@ fn manpages(sh: &Shell) -> Result<()> {
115115
Ok(())
116116
}
117117

118-
/// Generate markdown files (converted from the man pages, which are generated
119-
/// from the Rust sources) into docs/src, which ends up in the rendered
120-
/// documentation. This process is currently manual.
121-
#[context("man2markdown")]
122-
fn man2markdown(sh: &Shell) -> Result<()> {
118+
/// Update generated files, such as converting the man pages to markdown.
119+
/// This process is currently manual.
120+
#[context("Updating generated files")]
121+
fn update_generated(sh: &Shell) -> Result<()> {
123122
manpages(sh)?;
123+
// And convert the man pages into markdown, so they can be included
124+
// in the docs.
124125
for ent in std::fs::read_dir("target/man")? {
125126
let ent = ent?;
126127
let path = &ent.path();

0 commit comments

Comments
 (0)