Monday, April 17, 2006

GNU Make: Space vs TAB

How much more dumb can the designers of GNU make be to make the GNU Make utility sensitive to SPACE/TAB? I was modifying a makefile now and I hit make ALL and splat - it spit back at me telling me the following:

makefile:112: *** missing separator. Stop.

What the hell does this mean? Hmm, you will understand it better if you use an editor that gives you the option to turn on Tabs and spaces markers. The GNU make system requires you to have a TAB at the beginning of the line and not a space. If you do not have either of them and start from column 0 - its fine but you just cannot have space(s) at the beginning.

Make sure you remove that space and replace it with TAB and voila - make ALL works like a charm. FYI, I use editplus from www.editplus.com, and its feature of turning on TABS and SPACES came in handy today to recognize the space and tab in the file. There is a utility in /usr/bin called "unexpand" that converts spaces to tabs. Use that if you cannot use a good editor, to have your makefile mean sense to the GNU system.

P.S: I do like GNU make, just that these little quirks put me off...

0 Comments:

Post a Comment

<< Home