Live data from Hacker News

An opinionated approach to GNU Make

tech.davis-hansson.com

1–10 of 195 posts

Re: An opinionated approach to GNU Make

#2
I mostly use make like a package manager agnostic version of the "scripts" section in package.json, and some of the recommendations here are like a revelation for me. I didn't know you could change the tab character to a > for the commands, that's such a great improvement imo.

Re: An opinionated approach to GNU Make

#4
How about "your docker builds are wrong", too.

Don't generate some random id and a tag (as in the post). Use docker's "-iidfile" flag when building to write the actual id of the image to a file which can then be used in a "docker run".

Likewise, you can use "--cidfile" in a "docker run" to output the id to a file and use that later for accessing it.

Re: An opinionated approach to GNU Make

#5
This seems like a lot of work to not just consider ninja, meson, CMake, etc. I fully understand that the simplicity and portability of Make is alluring, but if you are actually using it to build C software it is a catastrophically poor choice and you can spend a ton of time and effort trying to come close to what you can get out of the box on a modern build system.

If the tradeoff was that Make was easier to use and debug, then maybe it could be justified, but in general my experience is that it's worse.

There are probably some use cases for Make where it remains difficult to replace for one reason or another, but most people using it anymore are not in that position. Now, it's usually more work to keep using it.

Re: An opinionated approach to GNU Make

#6
> .RECIPEPREFIX = >

That seems like a terrible idea. You change the basic syntax of the entire Makefile, forcing anybody reading it to get used to your custom indentation, where almost every line starts with an unnecessary >.

Post reply on HN