build.zig: install the langref to $prefix/doc/langref.html

and update the CI scripts to match.
This commit is contained in:
Andrew Kelley 2023-03-10 14:22:54 -07:00
parent f4428e5804
commit 2c326c87b1
5 changed files with 5 additions and 5 deletions

View File

@ -49,7 +49,7 @@ pub fn build(b: *std.Build) !void {
docgen_cmd.addArgs(&.{ "--zig", b.zig_exe }); docgen_cmd.addArgs(&.{ "--zig", b.zig_exe });
docgen_cmd.addFileSourceArg(.{ .path = "doc/langref.html.in" }); docgen_cmd.addFileSourceArg(.{ .path = "doc/langref.html.in" });
const langref_file = docgen_cmd.addOutputFileArg("langref.html"); const langref_file = docgen_cmd.addOutputFileArg("langref.html");
const install_langref = b.addInstallFileWithDir(langref_file, .prefix, "langref.html"); const install_langref = b.addInstallFileWithDir(langref_file, .prefix, "doc/langref.html");
if (!skip_install_lib_files) { if (!skip_install_lib_files) {
b.getInstallStep().dependOn(&install_langref.step); b.getInstallStep().dependOn(&install_langref.step);
} }

View File

@ -67,7 +67,7 @@ stage3-debug/bin/zig build test docs \
--zig-lib-dir "$(pwd)/../lib" --zig-lib-dir "$(pwd)/../lib"
# Look for HTML errors. # Look for HTML errors.
tidy --drop-empty-elements no -qe "$ZIG_LOCAL_CACHE_DIR/langref.html" tidy --drop-empty-elements no -qe "stage3-debug/doc/langref.html"
# Produce the experimental std lib documentation. # Produce the experimental std lib documentation.
stage3-debug/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib stage3-debug/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib

View File

@ -67,7 +67,7 @@ stage3-release/bin/zig build test docs \
--zig-lib-dir "$(pwd)/../lib" --zig-lib-dir "$(pwd)/../lib"
# Look for HTML errors. # Look for HTML errors.
tidy --drop-empty-elements no -qe "$ZIG_LOCAL_CACHE_DIR/langref.html" tidy --drop-empty-elements no -qe "stage3-release/doc/langref.html"
# Produce the experimental std lib documentation. # Produce the experimental std lib documentation.
stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib

View File

@ -66,7 +66,7 @@ stage3-debug/bin/zig build test docs \
--zig-lib-dir "$(pwd)/../lib" --zig-lib-dir "$(pwd)/../lib"
# Look for HTML errors. # Look for HTML errors.
tidy --drop-empty-elements no -qe "$ZIG_LOCAL_CACHE_DIR/langref.html" tidy --drop-empty-elements no -qe "stage3-debug/doc/langref.html"
# Produce the experimental std lib documentation. # Produce the experimental std lib documentation.
stage3-debug/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib stage3-debug/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib

View File

@ -67,7 +67,7 @@ stage3-release/bin/zig build test docs \
--zig-lib-dir "$(pwd)/../lib" --zig-lib-dir "$(pwd)/../lib"
# Look for HTML errors. # Look for HTML errors.
tidy --drop-empty-elements no -qe "$ZIG_LOCAL_CACHE_DIR/langref.html" tidy --drop-empty-elements no -qe "stage3-release/doc/langref.html"
# Produce the experimental std lib documentation. # Produce the experimental std lib documentation.
stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib