3 ms·
The syntax takes a little trial and error and usually finding real-world examples, but I like "make". I had one project that involved downloading a jdk, using
by tyingq 3y ago
The syntax takes a little trial and error and usually finding real-world examples, but I like "make".
I had one project that involved downloading a jdk, using it to build a project specific jre, patching some class files with local java sources, bundling it, etc.
Without being a make expert, it took me a couple of hours of reading, finding examples, etc...but now I have the dependency stuff working perfectly. Where it now only re-downloads or re-builds things if something upstream from it changed, handles errors well and points out what broke, etc.
All that to say, for some things, it's worth looking into for it's built-in dependency chain stuff. When you need to run arbitrary outside scripts/tools, it sometimes does things that other build tools can't (gradle in my case, couldn't easily do this, or at least I couldn't figure out how).
- dijit 3y agoMake is excellent for tasks where you have a file that needs to exist and steps that reliably cause it to exist. Excellent too for building a tree of things that depend on prior stages; in your example needing java to run a java applet which generates a file. the syntax takes some getting used to, but in those cases there is little better. But I do find people using it as a glorified task runner and it works but it’s quite possibly the least ergonomic tool available. - especially for things like making docker images, which I see extremely often
- maccard 3y agoThere's not really any better option though. Once you start setting environment variables, customising tagging, adding file prerequisites, handling building from a different directory (monorepo requiring access to shared resources), you need some sort of wrapper, with options, argparsinc and some rudimentary dependency checking. Make is a super low barrier to entry solution that with a small workaround (phony targets) gives you all of the above.