The fact that make is basically useless on Windows still makes it "not the first thing to try", to be honest. And it's rare to still see a project that can't be cross-platform, only lots that went "well my computer runs XYZ so I'm only compiling on that" =)
Make works just fine on Windows.
How I stopped worrying and loved Makefiles
131–140 of 144 posts
Re: How I stopped worrying and loved Makefiles
#132Earlier quoted context omitted.
Why invoke it via make when it can invoke itself? It's just another dependency that's not needed in this scenario.
Make is leaner and more agile than a custom CLI. It takes no time to get started, and there is no boilerplate. Removing or adding steps is trivial, running shell commands is trivial, and hooking into the dependency graph is trivial. Parallelism is built-in, as is dependency resolution. Tab-completion is standard on most Linux distros. It's also better from an architectural separation perspective. Your custom CLI will…
But how is make dependency free? You need to install make. Which version? GNU make, or FreeBSD make? What platform are you installing it on? What version? In my team we had to get all our devs to manually upgrade from 3 to 4 as we were using modern make features to make it a nicer task runner.
These are all things you've already had to deal with in the custom CLI, which is also a perfectly good entry point. You also have a lot more control of command line arguments, rather than just make targets ("just" has also added this as a feature)
Re: How I stopped worrying and loved Makefiles
#133My opinion may be a bit skewed by the fact that I write code that gets built on a variety of different platforms, though, and make is essentially universal. It lets me have a consistent build process regardless of platform.
It's also very useful for automation that isn't related to building code.
Re: How I stopped worrying and loved Makefiles
#134https://marketplace.visualstudio.com/items?itemName=lfm.vsco...
It allows you to click above target to run target.
Re: How I stopped worrying and loved Makefiles
#135This pattern of usage always seems like abuse. When `make` is used as a glorified front-end to `bash` scriptlets, why not use `bash` directly instead of having two-level of scripting? See: https://blog.aloni.org/posts/bash-functional-command-relay/
Re: How I stopped worrying and loved Makefiles
#136 .PHONY: foo
foo:
echo foo
bar: barin
cp barin bar
.PHONY: baz
baz: bar
echo bazRe: How I stopped worrying and loved Makefiles
#137Earlier quoted context omitted.
I've always wanted to use one of those, but you have to convince the other developers on your team to use it as well. Make is a relatively easy sell because it's on pretty much every system or at least trivial to install and has decades of reputation.
This is why I'm uninterested in just. I'd rather just use make than add another dependency.
Re: How I stopped worrying and loved Makefiles
#138Earlier quoted context omitted.
This is why I'm uninterested in just. I'd rather just use make than add another dependency.
It would have taken you less time to install it than it took you to write your comment.
Re: How I stopped worrying and loved Makefiles
#139Re: How I stopped worrying and loved Makefiles
#140Earlier quoted context omitted.
It would have taken you less time to install it than it took you to write your comment.
You're not accounting for updating my hundreds of existing Makefiles and CI config, and asking users to install yet another build dependency.
But you made the argument that adding another build dependency is somehow difficult or undesirable which I can't see; the tool is installed in seconds on all major OS-es and package managers.
So let's not conflate those two separate things, yeah?