mirror of
https://github.com/zigzap/zap.git
synced 2025-10-20 23:24:09 +00:00
fixed build.zig's deps for example
This commit is contained in:
parent
1174a4946d
commit
856d531642
1 changed files with 10 additions and 3 deletions
13
build.zig
13
build.zig
|
@ -26,16 +26,23 @@ pub fn build(b: *std.build.Builder) !void {
|
||||||
const example_run = example.run();
|
const example_run = example.run();
|
||||||
example_run_step.dependOn(&example_run.step);
|
example_run_step.dependOn(&example_run.step);
|
||||||
|
|
||||||
// install the artifact
|
// install the artifact - depending on the "example"
|
||||||
const example_build_step = b.addInstallArtifact(example);
|
|
||||||
// only after the ensure step
|
// only after the ensure step
|
||||||
example_build_step.step.dependOn(ensure_step);
|
|
||||||
// the step invoked via `zig build example` on the installed exe which
|
// the step invoked via `zig build example` on the installed exe which
|
||||||
// itself depends on the "ensure" step
|
// itself depends on the "ensure" step
|
||||||
|
const example_build_step = b.addInstallArtifact(example);
|
||||||
|
example.step.dependOn(ensure_step);
|
||||||
example_step.dependOn(&example_build_step.step);
|
example_step.dependOn(&example_build_step.step);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn logstep(msg: []const u8) void {
|
||||||
|
std.debug.print("=================================================\n", .{});
|
||||||
|
std.debug.print("== STEP : {s}\n", .{msg});
|
||||||
|
std.debug.print("=================================================\n", .{});
|
||||||
|
}
|
||||||
|
|
||||||
pub fn ensureDeps(step: *std.build.Step) !void {
|
pub fn ensureDeps(step: *std.build.Step) !void {
|
||||||
|
logstep("ENSURE DEPS");
|
||||||
_ = step;
|
_ = step;
|
||||||
const allocator = std.heap.page_allocator;
|
const allocator = std.heap.page_allocator;
|
||||||
ensureGit(allocator);
|
ensureGit(allocator);
|
||||||
|
|
Loading…
Add table
Reference in a new issue