Show HN: Minimal build system using just /bin/sh
1–10 of 65 posts
Re: Show HN: Minimal build system using just /bin/sh
#2Anyway, how does this compare, features-wise, with GNU Make? For example with make you have `./configure` files, do I also have them here?
Re: Show HN: Minimal build system using just /bin/sh
#3"notabug.org"... interesting. Anyway, how does this compare, features-wise, with GNU Make? For example with make you have `./configure` files, do I also have them here?
Re: Show HN: Minimal build system using just /bin/sh
#4"notabug.org"... interesting. Anyway, how does this compare, features-wise, with GNU Make? For example with make you have `./configure` files, do I also have them here?
So there's that.
Re: Show HN: Minimal build system using just /bin/sh
#5"notabug.org"... interesting. Anyway, how does this compare, features-wise, with GNU Make? For example with make you have `./configure` files, do I also have them here?
`configure` is not in itself a feature. What purpose does it fulfill for you? Then we can discuss how we may serve that purpose in some more lightweight manner.
Re: Show HN: Minimal build system using just /bin/sh
#6"notabug.org"... interesting. Anyway, how does this compare, features-wise, with GNU Make? For example with make you have `./configure` files, do I also have them here?
Looking as the sh code, it appears that it will work without tab characters. https://stackoverflow.com/a/2131227/1144060 So there's that.
So yes, eliminating tabs (or rather the execrable requirement of using tabs) was absolutely a prime goal.
Re: Show HN: Minimal build system using just /bin/sh
#7Re: Show HN: Minimal build system using just /bin/sh
#8This leaves the topological sorting of the tasks to the programmer? This is neat, but that's one very useful feature of make that's missing.
Outside of parallel builds, however, I actually prefer an explicit sequence of steps to so-called "declarative syntax". The frequency with which I find bugs in the dependency graph of `Makefile`s [1][2][3] suggests that people are starting from a sequence of commands anyway. And it's better for the reader as well to see the commands laid out in order, when they need to debug breakage on their setup. People should stop pretending to be Vulcans and just write a script for building their project, and then sprinkle in `older_than` directives as an optional optimization. Building from scratch should be the case to optimize for readability, rather than some exceptional situation.
[1] https://github.com/zetavm/zetavm/commit/4e5e2e9d8b
[2] https://github.com/tekknolagi/stackx/commit/5999202423
[3] Fun fact: when you try to build OpenBSD's userland from source, the top-level Makefile always unconditionally calls `make clean`. I've seen this pattern a few times: large projects find themselves up shit creek in the build system, and it's difficult enough to test and debug the dependency graph that they give up all performance and retreat to just recompiling everything, just to be safe.
Re: Show HN: Minimal build system using just /bin/sh
#9Earlier quoted context omitted.
Looking as the sh code, it appears that it will work without tab characters. https://stackoverflow.com/a/2131227/1144060 So there's that.
As it happens, I was moved to create this standalone repo showing off my current build setup after writing this comment: https://www.reddit.com/r/vim/comments/6l8z34/vim_betrayed_me... So yes, eliminating tabs (or rather the execrable requirement of using tabs) was absolutely a prime goal.
[Makefile]
indent_style = tab
And install the plugin, which is available for most editors and IDEs.Re: Show HN: Minimal build system using just /bin/sh
#10"notabug.org"... interesting. Anyway, how does this compare, features-wise, with GNU Make? For example with make you have `./configure` files, do I also have them here?
The concept of `./configure` is 100% orthogonal to Makefiles. You can have Makefiles without `./configure`, and you can have `./configure` that outputs something other than a Makefile. For example, I could easily imagine a `./configure` that prints a shell script like the one in the submission.