Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Note: Makefiles must be indented using TABs and not spaces or make will fail.

Oh no. I have never worked with Makefiles but I bet that causes pain and suffering.

I've lost so many hours to missing/extraneous spaces in YAML files that my team recently agreed to get rid of YAML from our Spring Boot codebase.



The "Tab in column 1" is a known bug.

from https://retrocomputing.stackexchange.com/questions/20292/why... which references https://beebo.org/haycorn/2015-04-20_tabs-and-makefiles.html

  So I gave up on being smart and just used a fixed pattern (^\t) to indicate rules.

  Within a few weeks of writing Make, I already had a dozen friends who were using it.

  So even though I knew that "tab in column 1" was a bad idea, I didn't want to disrupt my user base.

  So instead I wrought havoc on tens of millions.

  I have used that example in software engineering lectures.

  Side note: I was awarded the ACM Software Systems Award for Make a decade ago.  In my one minute talk on stage, I began "I would like to apologize". The audience then split in two - half started laughing, the other half looked at the laughers.


A no-issue if you use a half decent editor, same as python is not a problem today.


Do people not have different symbols for spaces/tabs in IDEs? I see people committing mixed or trailing whitespace but every editor I've used shows spaces and tabs clearly.

Agree about yaml though. I still have to look up how to align a multiline string every single time.


Aside from the editor thing. I indent usually with Tab :)

I learned Makefiles a bit, using it in one tiny project. Than checked Autotools and everything in my brain refused to learn this awkward workaround-engine. At the same time Meson[1] appeared and the thing with Builds, Dependencies and Testing is solved :)

[1] https://mesonbuild.com

PS: Dependency handling with Meson is awesome.


An editor that groks Makefiles will help immensely, as it will ensure that the TAB key does the right thing. Emacs is good at this.

Of course the real solution is: just use CMake, you dweeb.


this is literally never an issue because every editor automatically uses tabs for makefiles


actually requiring tabs is a godsend. no more off-by-one-space error




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: