What is the reason for Makefile profile syntax?

G'day

I am revising Python after a wonderful read by Michael Sparks, Peter Norwig Spell Checker at SO DevDay in London.

One of the points he highlighted is how pure Python should look. Not cluttered with brackets for areas, but using spaces to indicate a block area.

It made me think. I wonder if this is the cause of the TAB delays that are added to the commands needed to create the target.

Was it the same clarity? To easily distinguish between the goal and the commands needed to create the goal?

+18
syntax makefile
Nov 18 '09 at 12:04
source share
2 answers

From "The Art of Unix Programming" comes this quote:

Why is the tab in column 1? The yak was new; Lex was completely new. I did not try either, so I decided that this would be a good reason to study. After I burst in with my first hit in Lex, I just did something simple with the newline-tab template. He worked, he stayed. And then a few weeks later I had a population of about a dozen, most of them are friends, and I did not want to ruin my built-in base. The rest, unfortunately, is history.
- Stuart Feldman
+38
Nov 19 '09 at 18:37
source share

I think Makefiles is wrong by insisting on exactly specifying a single tab character for the indent. What is the harm in resolving gaps? There is no loss of accuracy, since shell commands cannot usefully start with spaces, and there is no confusion between the target lines and teams.

+2
Nov 18 '09 at 13:18
source share



All Articles