4 ms·
Seeing people reinvent make every 10 years is very frustrating. Just learn make!
by smackeyacky 2y ago
Seeing people reinvent make every 10 years is very frustrating. Just learn make!
- VS1999 2y agoPractically any language will do for running a set of tasks to compile a program. Unless you already love this "wheel" intimately, just learn a real language and use that.
- lelanthran 2y ago> Practically any language will do for running a set of tasks to compile a program. Like? None of the mainstream languages have any sort of builtin for dependency resolution.
- throwaway290232 2y ago[dead]
- kbolino 2y agoMake is conceptually great but brings a lot of legacy baggage. You often need to set up .PHONY targets, reset .SUFFIXES, and/or set MAKEFLAGS += --no-builtin-rules. There's also dollar-symbol variables (which plague Perl and shell as well) which made lots of sense in the 1970s with teletypes but hinder readability today (what the hell was $@ again?).
- chuckadams 2y agoOr the fact that $FOO interprets as $(F)OO without the slightest warning. And of course if you're in a script line, you probably meant $$FOO.. Make certainly has some obscure variables, but of all the basic knowledge of Make you need to learn, $@ is near the top of the list (it's "target". an @ sign looks kind of like a bullseye. If you want to see it as visiting a dependency graph, it's the dependency you're currently "at").
- kbolino 2y agoSure, if you use make enough, you likely remember the most important dollar-symbol stuff. But $@ is "all arguments (obeying quoting)" in bash, which is nothing like what it means in make.
- chuckadams 2y agoThat of course becomes "$$@" in a Makefile recipe if you want bash's behavior and not make's... which is one of the reasons I tend to keep my shell scripts in separate files, and only grow a Makefile to wrap them later if I have to. These days I just have the directory of scripts and no Makefile. Even the rare times I do C, I prefer a script that recompiles everything and slapping ccache on top of it (but usually I'm dealing with an existing Makefile, and I just pray that it's not generated by automake)
- gosub100 2y agoYeah remember tup? It was on hn probably a decade ago, people put a ton of work into it. Now "just" is the hot new thing.