diff options
| author | 2023-03-19 11:45:59 +0100 | |
|---|---|---|
| committer | 2023-03-19 11:45:59 +0100 | |
| commit | 6310cbd57684d62c4fb6ac73e0fa9883fab402c8 (patch) | |
| tree | b99e9f9b7421087eddb66615116dd6bd7c1bbfe0 /build.zig | |
| parent | build: use new addModule() API which now returns a Module (diff) | |
| download | zig-clap-6310cbd57684d62c4fb6ac73e0fa9883fab402c8.tar.gz zig-clap-6310cbd57684d62c4fb6ac73e0fa9883fab402c8.tar.xz zig-clap-6310cbd57684d62c4fb6ac73e0fa9883fab402c8.zip | |
Update to newest version of zig
Diffstat (limited to '')
| -rw-r--r-- | build.zig | 35 |
1 files changed, 20 insertions, 15 deletions
| @@ -48,20 +48,25 @@ pub fn build(b: *std.Build) void { | |||
| 48 | 48 | ||
| 49 | fn readMeStep(b: *std.Build) *std.Build.Step { | 49 | fn readMeStep(b: *std.Build) *std.Build.Step { |
| 50 | const s = b.allocator.create(std.build.Step) catch unreachable; | 50 | const s = b.allocator.create(std.build.Step) catch unreachable; |
| 51 | s.* = std.build.Step.init(.custom, "ReadMeStep", b.allocator, struct { | 51 | s.* = std.build.Step.init(.{ |
| 52 | fn make(step: *std.build.Step) anyerror!void { | 52 | .id = .custom, |
| 53 | @setEvalBranchQuota(10000); | 53 | .name = "ReadMeStep", |
| 54 | _ = step; | 54 | .owner = b, |
| 55 | const file = try std.fs.cwd().createFile("README.md", .{}); | 55 | .makeFn = struct { |
| 56 | const stream = file.writer(); | 56 | fn make(step: *std.build.Step, _: *std.Progress.Node) anyerror!void { |
| 57 | try stream.print(@embedFile("example/README.md.template"), .{ | 57 | @setEvalBranchQuota(10000); |
| 58 | @embedFile("example/simple.zig"), | 58 | _ = step; |
| 59 | @embedFile("example/simple-ex.zig"), | 59 | const file = try std.fs.cwd().createFile("README.md", .{}); |
| 60 | @embedFile("example/streaming-clap.zig"), | 60 | const stream = file.writer(); |
| 61 | @embedFile("example/help.zig"), | 61 | try stream.print(@embedFile("example/README.md.template"), .{ |
| 62 | @embedFile("example/usage.zig"), | 62 | @embedFile("example/simple.zig"), |
| 63 | }); | 63 | @embedFile("example/simple-ex.zig"), |
| 64 | } | 64 | @embedFile("example/streaming-clap.zig"), |
| 65 | }.make); | 65 | @embedFile("example/help.zig"), |
| 66 | @embedFile("example/usage.zig"), | ||
| 67 | }); | ||
| 68 | } | ||
| 69 | }.make, | ||
| 70 | }); | ||
| 66 | return s; | 71 | return s; |
| 67 | } | 72 | } |