I tried typing them in my command line (macos 12.4) and I would need to install them to use them.
I was taught make in CS101 in college and the majority of other people's projects I've looked at use it.
So the advantage is ubiquity and familiarity. Which can be useful if your code base is going to have a large number of people working on it.
Then you also stopped learning about developments in your field 15 years ago.
> I tried typing them in my command line (macos 12.4) and I would need to install them to use them.
Ok? And? We don't pre-installed dev tools on consumer operating systems. You won't find valgrind or vcpkg either.
> I was taught make in CS101 in college
The tools we taught to beginners over a decade ago are perhaps not suitable in all cases, in fact they are suitable in very few cases. Not much Pascal usage either anymore.
> the majority of other people's projects I've looked at use it.
Then you live in a very tiny bubble.
There's no way to respond other than to point out you've had a very bizarre, isolated 15 years if the only thing you encounter regularly is make. In the one language ecosystem where make is still popular (plain C), it's a minority that only comes in second overall for build tools [1]
[1]: https://www.jetbrains.com/lp/devecosystem-2022/c/#which-proj...
There’s value in not overloading your cognitive capacity with the most recent fads, there’s enough serious tools and tech to learn.
In so much as neither is pre-installed on a consumer operating system, yes, they are obviously equivalent.
> There’s value in not overloading your cognitive capacity with the most recent fads
Ninja has been the standard backend for CMake and other meta-generators for 11 years, it is hardly recent or a fad.
Moreover, you don't need to know anything about it, since it's a task-running backend format. You need to "know" it as much as you know the ELF object format or LLVM IR, your tools use it not you personally.
Though you could also argue that writing makefiles by hand is equally foolish. Use a tool designed for the job and not some duct tape that “works” everywhere but barely keeps things together. The example in the OP is missing handling of headers #including other headers, just to give one obvious example.
Do you need those features? You'd have to read about make to find out but it boils down to there being not much performance difference for small builds so make might have an edge there. When you get to android sized builds the reading of makefiles can take minutes and ninja wins there enough to make it worth sacrificing the features.