aboutsummaryrefslogtreecommitdiff
path: root/src/tomo.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-11-24 01:12:41 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-11-24 01:12:41 -0500
commit8de3edded640dfb4dc27fd5afae77faa2bf4acd5 (patch)
tree9e467ac3bcfcee8e7393a644d6f39028d566081a /src/tomo.c
parent83a2bff4bb04b0189d17419baf8ca520992d5033 (diff)
Add MANPAGE metadata for overriding whole file
Diffstat (limited to 'src/tomo.c')
-rw-r--r--src/tomo.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/tomo.c b/src/tomo.c
index a04ccf59..58bfabb3 100644
--- a/src/tomo.c
+++ b/src/tomo.c
@@ -877,12 +877,9 @@ Path_t compile_executable(env_t *base_env, Path_t path, Path_t exe_path, List_t
Path_t manpage_file = build_file(Path$with_extension(path, Text(".1"), true), "");
if (clean_build || !Path$is_file(manpage_file, true) || is_stale(manpage_file, path, true)) {
- OptionalText_t synopsys = ast_metadata(ast, "MANPAGE_SYNOPSYS");
- OptionalText_t description = ast_metadata(ast, "MANPAGE_DESCRIPTION");
- Text_t manpage = compile_manpage(Path$base_name(exe_path), synopsys, description,
- Match(main_binding->type, FunctionType)->args);
- if (!quiet) print("Wrote manpage:\t", Path$relative_to(manpage_file, Path$current_dir()));
+ Text_t manpage = compile_manpage(Path$base_name(exe_path), ast, Match(main_binding->type, FunctionType)->args);
Path$write(manpage_file, manpage, 0644);
+ if (!quiet) print("Wrote manpage:\t", Path$relative_to(manpage_file, Path$current_dir()));
} else {
if (verbose) whisper("Unchanged: ", manpage_file);
}