Skip to content

Commit

Permalink
docgen: don't leave garbage .h files lying around
Browse files Browse the repository at this point in the history
closes #1100
  • Loading branch information
andrewrk committed Jun 12, 2018
1 parent fdd9cf0 commit 13d3255
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/docgen.zig
Expand Up @@ -958,6 +958,9 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
var build_args = std.ArrayList([]const u8).init(allocator);
defer build_args.deinit();

const name_plus_h_ext = try std.fmt.allocPrint(allocator, "{}.h", code.name);
const output_h_file_name = try os.path.join(allocator, tmp_dir_name, name_plus_h_ext);

try build_args.appendSlice([][]const u8{
zig_exe,
"build-obj",
Expand All @@ -966,6 +969,8 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
"on",
"--output",
tmp_obj_file_name,
"--output-h",
output_h_file_name,
});

if (!code.is_inline) {
Expand Down

0 comments on commit 13d3255

Please sign in to comment.