News for hackers. Stuff that matters.
Re:I Like Makefiles by ReleaseCandidat on Saturday September 21, 2024 @02:09AM (#41607866)
> it works and, what's important, it works for him.

Until it doesn't. And then you really have to learn about PHONY targets, why and when there must be a tab and not spaces - good luck with an editor that doesn't treat Makefiles special and is configured to convert tabs to spaces.

Re:I Like Makefiles by dented42 on Saturday September 21, 2024 @02:20AM (#41607903)
But those are things that he’ll learn about as he keeps using make. And why does it matter that some editors don’t know about makefiles? The one he is using handles them just fine so what’s the problem?
Re:I Like Makefiles by ReleaseCandidat on Saturday September 21, 2024 @02:41AM (#41607980)
> And why does it matter that some editors don’t know about makefiles?

Because it isn't fun checking if the whitespace at the beginning of the line is a tab or spaces. And as said, you must know when to use tabs and/or spaces in rules.

For doing such a simple thing as calling some commands, Make has way too many subtle footguns which _will_ bite somebody, someday. The problem (that's not a problém at all, that's a reason to celebrate!) is that most JS devs and users aren't used to Make, compared to e.g. C programmers. To rephrase: as someone writing C, you have to use something like a Makefile, as anything else (like scripts) gets unreadable and -usable quite fast. But if you can get away with a less complex solution, you should really use that instead of Make.

Re:I Like Makefiles by instig007 on Saturday September 21, 2024 @03:24AM (#41608188)
> Because it isn't fun checking if the whitespace at the beginning of the line is a tab or spaces. And as said, you must know when to use tabs and/or spaces in rules.

that's why https://editorconfig.org/ exists, so that neither you nor your teammates have to think about these things

Re:I Like Makefiles by ReleaseCandidat on Saturday September 21, 2024 @04:33AM (#41608498)
> neither you nor your teammates have to think about these things

You're better off using a Makefile linter. But you must know about the problem before being able to solve it. And error messages like

   Makefile:2: *** missing separator.  Stop.
aren't the most helpful.
Re:I Like Makefiles by oblio on Saturday September 21, 2024 @04:44AM (#41608549)
You'll find the issue within 2 minutes of googling the error message.
Re:I Like Makefiles by wruza on Saturday September 21, 2024 @05:21AM (#41608698)
And as said, you must know when to use tabs and/or spaces in rules

Is that Stockholm syndrome? Or an appeal to history/authority in action? What makes people believe that this is even remotely reasonable.

inb kids these days, I started in the '90s and wrote my share of makefiles. Tolerating make only made sense until 2010-ish, then both hw and sw advances rendered it useless.

Edit: just realized my reply to a wrong person, but let it stay here

Re:I Like Makefiles by dented42 on Saturday September 21, 2024 @03:06PM (#41611949)
I genuinely don’t understand why that matters. The fact that there exists bad editors that don’t support my workflow shouldn’t prevent me from using the tools that I like and am comfortable with. I use editors that don’t screw up makefiles so what’s the problem? If I take your argument to the absolutely absurd logical extreme, I shouldn’t use lower case letters because some character encodings don’t support them.
Re:I Like Makefiles by scrame on Saturday September 21, 2024 @05:14AM (#41608667)
Because forcing devs to use tools for one specific format makes a bunch of unhappy devs. Especially if its just forcing them to use make.