LinuxQuestions.org
Review your favorite Linux distribution.
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, 08: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, 11:42 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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, 12:11 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,492

Rep: Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639
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 27 12-13-2021 09:55 AM
makefile:4: *** missing separator. Stop klavuzkarga Programming 1 12-17-2007 11:27 AM
/root/proclist/Makefile:5: *** missing separator. Stop. raklo Programming 17 09-02-2006 08:23 AM
spamassassin: makefile missing separator Andreja Linux - Software 1 05-31-2004 10:39 AM
Makefile separator problem Ownasaurus Linux - Software 5 09-07-2003 01:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:18 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
Open Source Consulting | Domain Registration