3 ms·
> [...] it is just a worse version of whatever scripting language you are in it, if you use it this way [...] If I may quote this little part: Oh no, it is act
by zelphirkalt 4y ago
> [...] it is just a worse version of whatever scripting language you are in it, if you use it this way [...]
If I may quote this little part: Oh no, it is actually much better, than what a huge part of developers in web development do: They use package.json of their project, where they add under the "scripts" attribute calls to commands, which contain again calls of "npm run", which again reference other "scripts" ... Of course there is no way to actually specify dependencies (previous steps a step depends on) as actual dependencies and the whole thing becomes a procedural thing, instead of a more declarative thing.
There is also no good way other than writing whole shell conditions in there, in a JSON file inside a mere string, if the command relies on a file existing. So in effect the logic will always run the step, which creates that file.
So this considered, I don't think Makefiles are really doing badly. You can do much worse.
EDIT:
> If make isn't generating at least some of your recipes for you, then why not just make a "build.sh" script?
Because then you don't get what Make brings to the table: tab completion, declarative dependency specification between steps, declarative definition of targets.
You would have to write code for these things yourself in that "build.sh" script.
- bee_rider 4y ago>> If make isn't generating at least some of your recipes for you, then why not just make a "build.sh" script? > Because then you don't get what Make brings to the table: tab completion, declarative dependency specification between steps, declarative definition of targets. Yeah, that part was a little bit flip. :) I think neglecting this feature ignores too much of Make's power, but it definitely does have other things going for it as well.