LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 01-23-2010, 09:24 AM   #1
mohabic
LQ Newbie
 
Registered: Nov 2009
Posts: 26

Rep: Reputation: 15
Missing Separator in makefile ?


I recieved this error while "make" the library
the makefile is:-
-----------------------------
if WITH_OPTIONAL_DIRS
optional_dirs = test doc testsuite
else
optional_dirs =
endif

SUBDIRS = ora utils matvec solver mllib export examples flens \
$(optional_dirs)
DIST_SUBDIRS = ora utils matvec solver mllib export examples flens test doc

EXTRA_DIST = ac_prog_perl_modules.m4 acx_blas.m4 acx_lapack.m4 boost.m4 \
libtool.m4 lang.m4
--------------------------

the error is:-
Makefile:1: *** missing separator. Stop.
Thanks on advance
 
Old 01-23-2010, 12:42 PM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Code:
if WITH_OPTIONAL_DIRS
Maybe this is not what you mean. The "if" statement is interpreted as a conditional statement for the shell and as such it requires a leading TAB, as for any other command to be executed by the shell. Hence the "missing separator" error. To check if a variable is defined use ifdef instead.

A suggestion for some good reading about Make programming: http://oreilly.com/catalog/make3/book/index.csp
 
Old 01-23-2010, 01:11 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,272

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
Two LQ threads about Makefile's :

http://www.linuxquestions.org/questi...stop-709818/#3

http://www.linuxquestions.org/questi...180/page3.html

> > Makefile template examples + lots of useful links.
.....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Makefile:15: *** missing separator. Stop. chakka.lokesh Linux - Software 25 12-22-2010 10:04 PM
makefile:4: *** missing separator. Stop klavuzkarga Programming 1 12-17-2007 12:27 PM
/root/proclist/Makefile:5: *** missing separator. Stop. raklo Programming 17 09-02-2006 09:23 AM
spamassassin: makefile missing separator Andreja Linux - Software 1 05-31-2004 11:39 AM
Makefile separator problem Ownasaurus Linux - Software 5 09-07-2003 02:07 PM


All times are GMT -5. The time now is 04:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration