6 ms·
> Microsoft has an implementation of make called Nmake, which comes with Visual Studio. It’s nearly a POSIX-compatible make, but necessarily breaks [...] Window
by carussell 9y ago
> Microsoft has an implementation of make called Nmake, which comes with Visual Studio. It’s nearly a POSIX-compatible make, but necessarily breaks [...] Windows also lacks a Bourne shell and the standard unix tools, so all of the commands will necessarily be different.
What I've been mulling over is an implementation of make that accepts only a restricted subset of the make syntax, eliding the extensions found in either BSD and GNU make, and disallowing use of non-standard extensions to the commands themselves (and maybe even further restricted still). In theory, a make that does this wouldn't even need to depend on a POSIX environment—it could treat the recipes not as commands but instead as a language. It wouldn't even take much to bootstrap this; you could use something like BusyBox as your interpreter. Call it `bake`.
Crucially, this is not another alternative to make: every bake script is a valid Makefile, which means it is make (albeit a restricted subset).
- noway421 9y agoThe naming is brilliant!
- chubot 9y agoI hope you're being sarcastic because there are already a half-dozen build tools called "bake"... it's literally the first name that everyone thinks of.
- _wmd 9y agoWhat you're mulling over is the precept for the autotools toolchain.. spare the next generation the same pain we bore :)
- deleted 9y ago[deleted]
- deleted 9y ago[deleted]
- carussell 9y agoAutotools is the opposite of what I'm suggesting. But maybe I'm missing some nuance in your comment. I think, though, that you may have read what I wrote, interpreted it as "new build tool", and immediately applied XKCD 927[1]. See my closing remarks in my last comment. 1. https://xkcd.com/927/ https://xkcd.com/927/
- adrianratnapala 9y agocarussell is suggesting the opposite of autotools in the sense of making a very restricted tool that only allows portable code (at least within the domain of that tool). By contrast, autotools tries to be expansive in many ways (1) it provides all kinds of bits and pieces of the toolchain, (2) it tries to support all systems by auto-generating build scripts using sniffed the system properties.
- bandrami 9y agoParticularly when it's used in combination with gnulib, which has an irritating tendency to build most of glibc if it doesn't recognize your build environment.
- lloeki 9y ago> What I've been mulling over is an implementation of make that accepts only a restricted subset of the make syntax, eliding the extensions found in either BSD and GNU make > every bake script is a valid Makefile, which means it is make (albeit a restricted subset). What do you think about writing a Makefile linter, like `shellcheck` is for shell scripts?