Skip to content

Commit 13d3255

Browse files
committedJun 12, 2018
docgen: don't leave garbage .h files lying around
closes #1100
·
0.15.20.3.0
1 parent fdd9cf0 commit 13d3255

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎doc/docgen.zig‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,9 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
958958
var build_args = std.ArrayList([]const u8).init(allocator);
959959
defer build_args.deinit();
960960

961+
const name_plus_h_ext = try std.fmt.allocPrint(allocator, "{}.h", code.name);
962+
const output_h_file_name = try os.path.join(allocator, tmp_dir_name, name_plus_h_ext);
963+
961964
try build_args.appendSlice([][]const u8{
962965
zig_exe,
963966
"build-obj",
@@ -966,6 +969,8 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
966969
"on",
967970
"--output",
968971
tmp_obj_file_name,
972+
"--output-h",
973+
output_h_file_name,
969974
});
970975

971976
if (!code.is_inline) {

0 commit comments

Comments
 (0)
Please sign in to comment.