logoalt Hacker News

peesemtoday at 1:24 AM1 replyview on HN

you _can_ just tell zig build to call make (std.Build.addSystemCommand, https://ziglang.org/documentation/0.16.0/std/#std.Build.addS...). the only benefits of an inbuilt make would be not having to install it and that it could maybe intercept calls to external compilers and replace them with `zig cc` or something similar but i get the impression that supporting nontrivial make scripts would be very hard


Replies

rtpgtoday at 1:44 AM

so then my glib question: what is the purpose of this project?

It does look like for some projects it's almost entirely "just declare the dep tree" (https://github.com/allyourcodebase/boringssl), + the tiniest patch.

But what's going on in grpc for example? Like this build file https://github.com/allyourcodebase/grpc/blob/master/build.zi...... why is this build file in this repo? Is the grpc makefile no bueno?

Efforts to pull out information from existing build systems (if possible, ofc) means that you don't have to spend your time _rewriting build scripts_.

I don't know if it's really possible. Maybe this is step .. 4 of 34 to getting there. Just wondering if there's an alternative here that doesn't involve rewriting build scripts

Maybe a part of the pitch here is to just upstream these build scripts so that ones makefile becomes "just" `zig build`? In that case I'd actually like to see (for example) a fork of oyacc using what is figured out in https://github.com/allyourcodebase/yacc to "just" use the build script even in the higher level project.

show 1 reply