Hacker News new | ask | show | jobs
by camilomatajira 343 days ago
<Make is a really powerful tool, with an expressive language that is quite esoteric with a bunch of idiosyncrasies (just like bash). > Agree

<"Well, Make is installed on everyones machine (....)"> It's not everywhere but almost.

<(Yet another idiosyncratic language that we have to deal with)> This is true. However, one has to choose its investments. I believe that Make is a powertool like awk, sed and bash, and despite its ideosyncracies, all of them have a positive ROI.

<Make is not a task runner, it's a build system.> I think a lot of confusion comes from having the wrong perspective on what Make actually is. From the Oreilly book on Make:

"It is important to understand that make is sort of two languages in one. The first language describes dependency graphs consisting of targets and prerequisites. The second language is a macro language for performing textual substitution. "

Make is a 1) language to express dependencies and a 2) language to template and do text substituion at a higher level than scripting languages; it's not a build system, though it's can be used as a tool to help compile C, C++ and possibly others langs. This gives you the ability to resolve simple or complex chains of dependencies by just specifying "target: prerequisities; recipe" and put variables everywhere to keep the code DRY and add conditional logic.

This means that Make shines in whatever follows the pattern "target: prerequisites; recipe" and that is almost all type of scripting! Including 'task runner' kind of jobs.

(In this sense, creating files out of files, and not recreating and existing file, is a "feature" but not the core of Make. )

Hence, when you say that it would be cool to be more bash-compatible I think Make provides a way (see the .ONESHELL target.)

The --list option, could be implemented with a really small awk script, and I also add some ASCII art.

Concerning the discoverability of rules, Make provides bash and zsh completion out of the box.

Parallel execution also works out of the box by adding the -J option.

Conditional logic could be added using "conditional processing directives" and with macro expansions.

Make indeed is really powerful, I would recommend everyone to checkout the Oreilly book on Make.

And again, I'm not trying to bash Just or Task. I'm trying to point out that only because a tool is new does not mean that is better than the old one.