4 ms·
Makefiles seem to be making a comeback. My current and previous teams use them extensively across projects in multiple languages and I don't have any major grip
by nwsm 3y ago
Makefiles seem to be making a comeback. My current and previous teams use them extensively across projects in multiple languages and I don't have any major gripes.
- anotherhue 3y agoThey can get quite gnarly, check out Just as a modern alternative: https://github.com/casey/just https://github.com/casey/just
- dharmab 3y agoMy biggest gripe is that it's impossible to lint or autoformat a Makefike, I wish other tools were more popular.
- anotherhue 3y agoYeah, I love when a naive dev helpfully replaces the tabs because their VSCode is setup that way. (Make syntax requires tabs)
- jjgreen 3y agoI'll see your Makefile and raise you ... autoconf!
- zare_st 3y agoOn a bare POSIX system thing like CMake first needs to exist there to work. And it isn't in spec. Autoconf emits a source distribution that's build-configured using a famous 'configure' shell script. Since POSIX is still a thing I wouldn't even put autoconf as outdated. It still has purposes. For example I'd say that outdated tech would be running your website using CGI, preferably using C backend for extra mushiness.
- zare_st 3y agoMake is still the only build automation tool specified under POSIX standard. Also, makefiles never went anywhere because CMake emitted them.
- kaba0 3y agoI have taken a huge liking to Mill. It is a build tool written in Scala, but it is not only for Scala at all. The author’s blog post is quite informative (https://www.lihaoyi.com/post/SoWhatsSoSpecialAboutTheMillScalaBuildTool.html https://www.lihaoyi.com/post/SoWhatsSoSpecialAboutTheMillSca... ), but the core idea is that a functional program’s call stack maps one-to-one to a build description, where functions are build steps. Something as simple as def cSources = .. def compile() = T { proc(“gcc”, cSources(), “-o”, outputBinary) Path(outputBinary) // last expression is result } def link() = T { // similar to previous one, using compile() somewhere } will automagically convert this description into a build graph, that can be executed parallel and cached.
- zelphirkalt 3y agoDoes written in Scala mean, that you need the JVM to run it? That would make it a no-go for many projects.
- kaba0 3y agoWhat project couldn’t include it as a build-time only dependency?
- atmosx 3y agoReally? I thought most new projects were switching to ninja[^1] and have never used it. [^1]: https://ninja-build.org/ https://ninja-build.org/
- deciduously 3y agoPeople handwrite ninja?
- nunez 3y agoMakefiles have never left for me. They execute jobs related to build and packaging, and they do that job super well. Also helps that make is installed by default on most Linuxes