Skip to content

Commit

Permalink
Add docs build step. (#1261)
Browse files Browse the repository at this point in the history
  • Loading branch information
hordurj committed Aug 25, 2024
1 parent be8719a commit 4c8fbb2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,23 @@ pub fn build(b: *std.Build) !void {
test_step.dependOn(&run_unit_tests.step);

if (want_sysgpu) linkSysgpu(b, &unit_tests.root_module);

// Documentation
const docs_obj = b.addObject(.{
.name = "mach",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = .Debug,
});
//docs_obj.root_module.addOptions("build_options", build_options);
const docs = docs_obj.getEmittedDocs();
const install_docs = b.addInstallDirectory(.{
.source_dir = docs,
.install_dir = .prefix,
.install_subdir = "docs",
});
const docs_step = b.step("docs", "Generate docs");
docs_step.dependOn(&install_docs.step);
}
}

Expand Down

0 comments on commit 4c8fbb2

Please sign in to comment.