| ... | ... | @@ -40,19 +40,22 @@ pub fn build(b: *std.Build) !void { |
| 40 | 40 | }); |
| 41 | 41 | docgen_exe.single_threaded = single_threaded; |
| 42 | 42 | |
| 43 | | const langref_out_path = try b.cache_root.join(b.allocator, &.{"langref.html"}); |
| 44 | | const docgen_cmd = docgen_exe.run(); |
| 45 | | docgen_cmd.addArgs(&[_][]const u8{ |
| 46 | | "--zig", |
| 47 | | b.zig_exe, |
| 48 | | "doc" ++ fs.path.sep_str ++ "langref.html.in", |
| 49 | | langref_out_path, |
| 50 | | }); |
| 51 | | docgen_cmd.step.dependOn(&docgen_exe.step); |
| 43 | const docgen_cmd = b.addRunArtifact(docgen_exe); |
| 44 | docgen_cmd.addArgs(&.{ "--zig", b.zig_exe }); |
| 45 | docgen_cmd.addFileSourceArg(.{ .path = "doc/langref.html.in" }); |
| 46 | const langref_file = docgen_cmd.addOutputFileArg("langref.html"); |
| 47 | const install_langref = b.addInstallFileWithDir(langref_file, .prefix, "langref.html"); |
| 48 | b.getInstallStep().dependOn(&install_langref.step); |
| 52 | 49 | |
| 53 | 50 | const docs_step = b.step("docs", "Build documentation"); |
| 54 | 51 | docs_step.dependOn(&docgen_cmd.step); |
| 55 | 52 | |
| 53 | // This is for legacy reasons, to be removed after our CI scripts are upgraded to use |
| 54 | // the file from the install prefix instead. |
| 55 | const legacy_write_to_cache = b.addWriteFiles(); |
| 56 | legacy_write_to_cache.addCopyFileToSource(langref_file, "zig-cache/langref.html"); |
| 57 | docs_step.dependOn(&legacy_write_to_cache.step); |
| 58 | |
| 56 | 59 | const check_case_exe = b.addExecutable(.{ |
| 57 | 60 | .name = "check-case", |
| 58 | 61 | .root_source_file = .{ .path = "test/src/Cases.zig" }, |