Yes, I know the title *sounds* Python-related, but it isn't.
The other day, I saw this article: Make - An afterburner for your command-line. It extolled the virtues of the Unix
make tool, so I decided to give the examples a try. (I've used
make many times with existing or hand-edited Makefiles, but I've never really had to write a Makefile from scratch.)
Much to my surprise and dismay,
make requires tabs. Consider this example:
two: echo two one: echo one all: one two echo all echo done
A hapless user (possibly a Pythoneer ;-) might think that the
echos can be indented using spaces. However, all the indented lines require tabs. Spaces don't work.
This is a bit of a nuisance, since I like my editors to insert 4 spaces when I press the Tab key, so I'd have to find ways around it to insert an actual tab character (e.g. by doing Ctrl-V <Tab> in vim)... but that's really not the point. Rather, what I'm wondering is, why was
make designed this way? Wouldn't it have been better to accept both tabs and spaces to indicate that a line is part of a "block"? Is there a reason why this wouldn't work, or would be undesirable?
Update/1: Doug Landauer pointed me to the following passage in The Art of Unix Programming:
No discussion of make(1) would be complete without an acknowledgement that it includes one of the worst design botches in the history of Unix. The use of tab characters as a required leader for command lines associated with a production means that the interpretation of a makefile can change drastically on the basis of invisible differences in whitespace.