Thread with 11 posts
jump to expanded posti don't love the tone of this article but i agree with a lot of what it says about gnu automake. my experience with it in php was awful. it belongs in the dustbin of history https://felipec.wordpress.com/2024/04/04/xz-backdoor-and-autotools-insanity/
shell scripts are arcane enough when they're little things written in bash. automake is a massive shell script library written in m4
the thing about build scripts is that nobody cares about them. you write your project in c, c++, rust, whatever… some language you know well and enjoy using. but in order to actually configure/compile/link/package it, inevitably you need Some Other Language to help you
you don't care about the beauty of your build system. build systems are hell. you just want it to work. almost always the resulting code is far from beautiful. if it is readable and well-structured, it probably hasn't made contact with multiple platforms or configurations yet
so, build scripts are the kind of unloved, neglected code where bugs too easily hide. but i think we collectively make this worse for ourselves by writing this code in unloved languages we don't or can't fully understand. python is just about acceptable. but bash? that's arcane.
m4? that's on another level. yes, of course you should learn the language if you're going to use something that requires it. but automake is basically the only reason you'd ever have to learn m4. do you care enough to bother? i doubt it! i certainly don't!
this may be unpopular, but cmake's configuration language is also arcane in my opinion. my experience with reading its documentation trying to figure out what code does and how to do anything vaguely complex with it is only pain. but that's an aside. it's okay for simple projects
anyway:
• unloved code is bad
• unloved code in arcane languages is worse
therefore:
• gnu autotools must die
• please stop writing shell scripts
• we need better build systems
@hikari Unfortunately, no one has made a better DSL for spawn
than shell. Perl and Ruby are closest, but Ruby conventions have moved away from being spawn-friendly, and Perl isn’t much better than shell in terms of maintainability for most people.
@jrose yeah i was going to say, the world desperately needs a better shell scripting language
@hikari “but they have! check out nushell or fish! or that other one!” you want me to learn another language and put it in my repository? making it a build dependency? yeah right
(which is why the best answer so far is “make your package manager do it”, but that’s definitely only an 80/20 solution)