authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-03-09 22:12:36-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-03-15 10:48:14-07:00
log28bda2eab04e217fe4ba801a9710b2225d141940
treefc6930e912ce6190ecf9de3094e615fe5e03a66b
parent857296a9f4bc56c3bf710b11a0868c4cf15b6ff3

make -Dno-lib also skip docgen


1 files changed, 8 insertions(+), 6 deletions(-)

build.zig+8-6
...@@ -31,6 +31,11 @@ pub fn build(b: *std.Build) !void {...@@ -31,6 +31,11 @@ pub fn build(b: *std.Build) !void {
31 const use_zig_libcxx = b.option(bool, "use-zig-libcxx", "If libc++ is needed, use zig's bundled version, don't try to integrate with the system") orelse false;31 const use_zig_libcxx = b.option(bool, "use-zig-libcxx", "If libc++ is needed, use zig's bundled version, don't try to integrate with the system") orelse false;
3232
33 const test_step = b.step("test", "Run all the tests");33 const test_step = b.step("test", "Run all the tests");
34 const deprecated_skip_install_lib_files = b.option(bool, "skip-install-lib-files", "deprecated. see no-lib") orelse false;
35 if (deprecated_skip_install_lib_files) {
36 std.log.warn("-Dskip-install-lib-files is deprecated in favor of -Dno-lib", .{});
37 }
38 const skip_install_lib_files = b.option(bool, "no-lib", "skip copying of lib/ files and langref to installation prefix. Useful for development") orelse deprecated_skip_install_lib_files;
3439
35 const docgen_exe = b.addExecutable(.{40 const docgen_exe = b.addExecutable(.{
36 .name = "docgen",41 .name = "docgen",
...@@ -45,7 +50,9 @@ pub fn build(b: *std.Build) !void {...@@ -45,7 +50,9 @@ pub fn build(b: *std.Build) !void {
45 docgen_cmd.addFileSourceArg(.{ .path = "doc/langref.html.in" });50 docgen_cmd.addFileSourceArg(.{ .path = "doc/langref.html.in" });
46 const langref_file = docgen_cmd.addOutputFileArg("langref.html");51 const langref_file = docgen_cmd.addOutputFileArg("langref.html");
47 const install_langref = b.addInstallFileWithDir(langref_file, .prefix, "langref.html");52 const install_langref = b.addInstallFileWithDir(langref_file, .prefix, "langref.html");
48 b.getInstallStep().dependOn(&install_langref.step);53 if (!skip_install_lib_files) {
54 b.getInstallStep().dependOn(&install_langref.step);
55 }
4956
50 const docs_step = b.step("docs", "Build documentation");57 const docs_step = b.step("docs", "Build documentation");
51 docs_step.dependOn(&docgen_cmd.step);58 docs_step.dependOn(&docgen_cmd.step);
...@@ -76,11 +83,6 @@ pub fn build(b: *std.Build) !void {...@@ -76,11 +83,6 @@ pub fn build(b: *std.Build) !void {
76 const skip_stage1 = b.option(bool, "skip-stage1", "Main test suite skips stage1 compile error tests") orelse false;83 const skip_stage1 = b.option(bool, "skip-stage1", "Main test suite skips stage1 compile error tests") orelse false;
77 const skip_run_translated_c = b.option(bool, "skip-run-translated-c", "Main test suite skips run-translated-c tests") orelse false;84 const skip_run_translated_c = b.option(bool, "skip-run-translated-c", "Main test suite skips run-translated-c tests") orelse false;
78 const skip_stage2_tests = b.option(bool, "skip-stage2-tests", "Main test suite skips self-hosted compiler tests") orelse false;85 const skip_stage2_tests = b.option(bool, "skip-stage2-tests", "Main test suite skips self-hosted compiler tests") orelse false;
79 const deprecated_skip_install_lib_files = b.option(bool, "skip-install-lib-files", "deprecated. see no-lib") orelse false;
80 if (deprecated_skip_install_lib_files) {
81 std.log.warn("-Dskip-install-lib-files is deprecated in favor of -Dno-lib", .{});
82 }
83 const skip_install_lib_files = b.option(bool, "no-lib", "skip copying of lib/ files to installation prefix. Useful for development") orelse deprecated_skip_install_lib_files;
8486
85 const only_install_lib_files = b.option(bool, "lib-files-only", "Only install library files") orelse false;87 const only_install_lib_files = b.option(bool, "lib-files-only", "Only install library files") orelse false;
8688