3 ms·
> If you let Make accept spaces then there’s no backwards compatible way for it to tell the difference. "Rules start with non-whitespace"?
by Izkata 4y ago
> If you let Make accept spaces then there’s no backwards compatible way for it to tell the difference.
"Rules start with non-whitespace"?
- TAForObvReasons 4y agoThat breaks backwards compatibility since a rule line can start with spaces: nonws: <tab>echo nonws ws: <tab>echo ws
- lisper 4y ago> a rule line can start with spaces Well, that's stupid. And it's news to me. I have never seen a makefile that actually did this. So you could still fix the problem and be backwards-compatible for probably 99% of actual cases. And you could provide a --stupid-whitespace-mode flag for non-backwards-compatible makefies. Honestly, I still see no legitimate reason to continue this insanity.
- maskros 4y agoNot all that uncommon, especially in ifdef situations: ifdef (something,something) rule: something specific recipe else rule: common recipe endif It's also not just rules. Variable assignments are also separate from recipes, and can be indented with spaces. ifdef (something) CFLAGS=something else CFLAGS=otherthing endif
- lisper 4y agoOK, you've convinced me. MAKE is beyond redemption.