[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (no subject)

From: Bob Proulx
Subject: Re: (no subject)
Date: Mon, 17 Nov 2003 21:47:38 -0700
User-agent: Mutt/1.3.28i

spai wrote:
> 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.

cat Makefile.bak 
sources= foo.cpp main.cpp
OBJECTS= $(sources:.cpp=.o)

    @echo $(sources)
    @echo $(OBJECTS)
^^^^ 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

  info make

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::.

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]