build: use emit-docs for docs, don't need it on build config

This commit is contained in:
Mitchell Hashimoto
2024-01-21 14:22:58 -08:00
parent 510f270c54
commit 0967fb46f8
2 changed files with 6 additions and 13 deletions

View File

@ -102,10 +102,10 @@ pub fn build(b: *std.Build) !void {
"Name of the conformance app to run with 'run' option.", "Name of the conformance app to run with 'run' option.",
); );
config.documentation = b.option( const emit_docs = b.option(
bool, bool,
"documentation", "emit-docs",
"Build generated documentation", "Build and install auto-generated documentation",
) orelse true; ) orelse true;
const emit_test_exe = b.option( const emit_test_exe = b.option(
@ -421,7 +421,7 @@ pub fn build(b: *std.Build) !void {
} }
// Documenation // Documenation
if (config.documentation) buildDocumentation(b, version); if (emit_docs) buildDocumentation(b, version);
// App (Linux) // App (Linux)
if (target.result.os.tag == .linux and config.app_runtime != .none) { if (target.result.os.tag == .linux and config.app_runtime != .none) {
@ -1166,14 +1166,8 @@ fn buildDocumentation(
name: []const u8, name: []const u8,
section: []const u8, section: []const u8,
}{ }{
.{ .{ .name = "ghostty", .section = "1" },
.name = "ghostty", .{ .name = "ghostty", .section = "5" },
.section = "1",
},
.{
.name = "ghostty",
.section = "5",
},
}; };
inline for (manpages) |manpage| { inline for (manpages) |manpage| {

View File

@ -21,7 +21,6 @@ pub const BuildConfig = struct {
static: bool = false, static: bool = false,
flatpak: bool = false, flatpak: bool = false,
libadwaita: bool = false, libadwaita: bool = false,
documentation: bool = true,
app_runtime: apprt.Runtime = .none, app_runtime: apprt.Runtime = .none,
renderer: rendererpkg.Impl = .opengl, renderer: rendererpkg.Impl = .opengl,
font_backend: font.Backend = .freetype, font_backend: font.Backend = .freetype,