[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (no subject)
Re: (no subject)
Mon, 17 Nov 2003 21:47:38 -0700
> I'm getting a Makefile error which says missing separator
> on line 5. I'm at my wit's end to figure why I'm getting this
> error. The Makefile is attached. I'm running tcsh as my shell.
sources= foo.cpp main.cpp
^^^^ three spaces at start of file
The problem is that those lines should be using TABs instead of
spaces. If it had been a perfect match of eight spaces then make
would have guessed this problem more closely for you. But you used
only four spaces, an unusual error, and it just gave the generic
Errors Generated by Make
`missing separator. Stop.'
`missing separator (did you mean TAB instead of 8 spaces?). Stop.'
This means that `make' could not understand much of anything about
the command line it just read. GNU `make' looks for various kinds
of separators (`:', `=', TAB characters, etc.) to help it decide
what kind of commandline it's seeing. This means it couldn't find
a valid one.
One of the most common reasons for this message is that you (or
perhaps your oh-so-helpful editor, as is the case with many
MS-Windows editors) have attempted to indent your command scripts
with spaces instead of a TAB character. In this case, `make' will
use the second form of the error above. Remember that every line
in the command script must begin with a TAB character. Eight
spaces do not count. *Note Rule Syntax::.
The COMMAND lines start with a tab character. The first command may
appear on the line after the prerequisites, with a tab character, or may
appear on the same line, with a semicolon. Either way, the effect is
the same. *Note Writing the Commands in Rules: Commands.