LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-29-2006, 12:26 AM   #1
raklo
Member
 
Registered: Apr 2006
Posts: 143

Rep: Reputation: 15
/root/proclist/Makefile:5: *** missing separator. Stop.


hi all,
i've written a small driver code for whcih ive created a Makefile the contents of which r as shown below

####################################

#MODULE_NAME = test
#$(MODULE_NAME)-objs=inode.o proclist.o

#obj-m := $(MODULE_NAME).o
ifneq($(KERNELRELEASE),)
obj-m:=proclist.o
else
KDIR:=/usr/src/linux-2.6.11.1
PWD:=$(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
endif
#########################################

when i tried to compile the code with #make,it shows the message

/root/proclist/Makefile:5: *** missing separator. Stop.

.I know the above problem occurs when TAB is replace by
8 SPACES during process of copying contents by the system.
i've verified it and there is no replace ment,as i've manually typed in the code.

so wot is probably the problem???????/
ANY INPUT IS APPRECIATED
regards
rakesh
 
Old 08-29-2006, 05:29 PM   #2
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
First, use [code] to preserve indentation, as it is important for Makefiles. Your editor may be replacing the tabs with spaces automatically
 
Old 08-29-2006, 08:40 PM   #3
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
> i've verified it and there is no replace ment,as i've manually typed in the code.

so you typed it in wrong. we cant help though because as tuxdev said
 
Old 08-30-2006, 01:36 AM   #4
raklo
Member
 
Registered: Apr 2006
Posts: 143

Original Poster
Rep: Reputation: 15
as u had asked the distro,i'm using FC3 packages and the kernel is 2.6.11.1.
as u said,my editor must be automatically replacing TABS with SPACES,i changed the editor(from vi to gedit to emacs )but still no change in the outcome.is there any other editor that i can try

as u had said, i may have typed wrong,the code that i hav pasted in the query(between the ###### lines) is copy of my code,is it wrong somewhere???

THANX for ur replies
rakesh

Last edited by raklo; 08-30-2006 at 01:37 AM.
 
Old 08-30-2006, 09:15 AM   #5
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
did you read either of the two previous posts? check out the link that i posted in my first post (psst code tags) and then edit or repost your makefile source.
 
Old 08-30-2006, 09:29 AM   #6
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
Really, we can't help you at all without the [code] tags. For this question, it is really, really important. You might try vim with my .vimrc, which disables replacing tabs with spaces for files that look like ?akefile* (that means it starts with any character, then akefile, then any number of any character). "syn on" will do syntax highlighting, so if you have syntax errors, it will complain loudly with an unpleasant color. The hi lines simply change the colours, so you can skip that if you like the defaults (it is actually what I remember the defaults are before they suddenly decided to change). "bs=2" means that you can backspace freely, "ts=3" means that my tabs are 3 spaces, "sw=3" means that the > and < shifting keys will shift by 3 space, "bg=dark" for better colours on a black background, "ai" means autoindent stuff, "et" means expand tabs into spaces, "ic" means ignore case for searching, and "ru" means provide a bit of text on the bottom to tell me where I am in the file.
Code:
set ff=unix bs=2 ts=3 sw=3 bg=dark ai et ic ru
syn on
hi SpecialKey     term=bold ctermfg=4
hi NonText        term=bold cterm=bold ctermfg=4
hi Directory      term=bold ctermfg=4
hi ErrorMsg       term=standout cterm=bold ctermfg=7 ctermbg=1
hi IncSearch      term=reverse cterm=reverse
hi Search         term=reverse ctermbg=3
hi MoreMsg        term=bold ctermfg=2
hi ModeMsg        term=bold cterm=bold
hi LineNr         term=underline ctermfg=3
hi Question       term=standout ctermfg=2
hi StatusLine     term=bold,reverse cterm=bold,reverse
hi StatusLineNC   term=reverse cterm=reverse
hi VertSplit      term=reverse cterm=reverse
hi Title          term=bold ctermfg=5
hi Visual         term=reverse cterm=reverse
hi VisualNOS      term=bold,underline cterm=bold,underline
hi WarningMsg     term=standout ctermfg=1
hi WildMenu       term=standout ctermfg=0 ctermbg=3
hi Folded         term=standout ctermfg=4 ctermbg=7
hi FoldColumn     term=standout ctermfg=4 ctermbg=7
hi DiffAdd        term=bold ctermbg=4
hi DiffChange     term=bold ctermbg=5
hi DiffDelete     term=bold cterm=bold ctermfg=4 ctermbg=6
hi DiffText       term=reverse cterm=bold ctermbg=1
hi SignColumn     term=standout ctermfg=4 ctermbg=7
hi Comment        term=bold ctermfg=4
hi Constant       term=underline ctermfg=1
hi Special        term=bold ctermfg=5
hi Identifier     term=underline ctermfg=6
hi Statement      term=bold ctermfg=3
hi PreProc        term=underline ctermfg=5
hi Type           term=underline ctermfg=2
hi Underlined     term=underline cterm=underline ctermfg=5
hi Ignore         cterm=bold ctermfg=7
hi Error          term=reverse cterm=bold ctermfg=7 ctermbg=1
hi Todo           term=standout ctermfg=0 ctermbg=3
au BufEnter ?akefile* set noet
au BufLeave ?akefile* set et
augroup Binary
  au!
  au BufReadPre  *.bin let &bin=1
  au BufReadPost *.bin if &bin | %!xxd
  au BufReadPost *.bin set ft=xxd | endif
  au BufWritePre *.bin if &bin | %!xxd -r
  au BufWritePre *.bin endif
  au BufWritePost *.bin if &bin | %!xxd
  au BufWritePost *.bin set nomod | endif
augroup END
 
Old 08-30-2006, 11:11 PM   #7
raklo
Member
 
Registered: Apr 2006
Posts: 143

Original Poster
Rep: Reputation: 15
thanx xhi and tuxdev,
but the post that u (xhi)have snt basically contains some VB tags,and i dont know wht my Makefile has to do with those tags.
very sorry if the question is too STUPID.
thanx again n waiting for reply
regards
rakesh
 
Old 08-30-2006, 11:21 PM   #8
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
ok. luckily i am drinking heavily (Evan Williams, i love kentucky bourbon), so i will be able to actually answer this in a civilized way.

your question is not "too STUPID", not stupid at all. i think we are simply misunderstanding each other here.

USE CODE TAGS means that you should wrap code (code being anything that is intended to be interpreted, compiled, or otherwise not plain english) within the [code] tags that are show on the link i posted.

>but the post that u (xhi)have snt basically contains some VB tags,and i dont know wht my Makefile has to do with those tags.

what those tags have to do with your Makefile? they have nothing to do with your makefile, but they have everything to do with someone here being able to analyze the make code that you posted and tell you what you did wrong. if you do not use code tags you lose all formatting including tabs, which are very important to a makefile.

just repost the makefile with a [code] at the beginning and a [ /code] at the end as in the example that is at the link i posted.
 
Old 08-30-2006, 11:53 PM   #9
raklo
Member
 
Registered: Apr 2006
Posts: 143

Original Poster
Rep: Reputation: 15
thanx again,as u said here is the makefile
#################################
#################################
#MODULE_NAME = test
#$(MODULE_NAME)-objs=inode.o proclist.o

#obj-m := $(MODULE_NAME).o
Code:
ifneq($(KERNELRELEASE),)
obj-m := proclist.o
else
KDIR := /usr/src/linux-2.6.11.1
PWD := $(shell pwd)
default:
        $(MAKE) -C $(KDIR) SUBDIRS = $(PWD) modules
endif

#proclist-objs:=inode.o
#proclist-y:=devpts.o #devpts.o shud be renamed as devpts.o_shipped

clean:
        rm -f *.ko *.mod.c *.mod.o proclist.o .*.cmd
###############################################

i'd like to attach the file but i dont know how to so i'm again pasting the code.

hope i didnt disturb ur session with kentucky bourbon!!
i'm from a place in india where alchohol is legally banned,so dont know much bout drinks.

anywayz if want any more details ,just let me know

regards
rakesh
 
Old 08-31-2006, 12:07 AM   #10
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
banned alcohol? wow, that is wrong.

but anyhow, well done with the code tags

i am seeing an extra tab in front of default (there should be nothing, default should be at the start of the line)

and also there are 8 spaces instead of a tab infrom of the clean command
 
Old 08-31-2006, 12:14 AM   #11
raklo
Member
 
Registered: Apr 2006
Posts: 143

Original Poster
Rep: Reputation: 15
but the ban cant deter us from drinking!

u said u can see a TAB in from of 'default' and 8 SPACES in front of 'clear',but in my Makefile 'default' does start from the start of the line and same is the case with 'clean'
r u using any utility that shows such EXTRA TAGS and SPACES.?????

even in the code,that ive sent u they start from the start of line.

how to remove the TABS and SPACES that i cant see??

regards
rakesh
 
Old 08-31-2006, 12:25 AM   #12
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
> but the ban cant deter us from drinking!
that is good to hear! that sounds like a terrible law, im sure the people who put it in place are enjoying a drink behind closed doors ..

yes i am seeing an extra tab in front of default:

Code:
ifneq($(KERNELRELEASE),)
obj-m := proclist.o
else
KDIR := /usr/src/linux-2.6.11.1
PWD := $(shell pwd)
default:
	$(MAKE) -C $(KDIR) SUBDIRS = $(PWD) modules
endif

#proclist-objs:=inode.o
#proclist-y:=devpts.o #devpts.o shud be renamed as devpts.o_shipped

clean:
	rm -f *.ko *.mod.c *.mod.o proclist.o .*.cmd
that is your makefile with the tabs fixed.. copy and past and see what that does.
 
Old 08-31-2006, 12:38 AM   #13
raklo
Member
 
Registered: Apr 2006
Posts: 143

Original Poster
Rep: Reputation: 15
sme is the case,
still it is showing

Makefile:1: *** missing separator. Stop

do u think therez some prob with the editor(i have also tried with gedit and emacs)

but when i copy it from the site the work
fneq is copied,due to some reason 'i' is not printed and i have to manually print in the 'i'
is that th eproblem
regards
rakesh
 
Old 08-31-2006, 12:40 AM   #14
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
what happens if you get rid of the if else and just do this..

Code:
KDIR := /usr/src/linux-2.6.11.1
PWD := $(shell pwd)
default:
	$(MAKE) -C $(KDIR) SUBDIRS = $(PWD) modules

#proclist-objs:=inode.o
#proclist-y:=devpts.o #devpts.o shud be renamed as devpts.o_shipped

clean:
	rm -f *.ko *.mod.c *.mod.o proclist.o .*.cmd
 
Old 08-31-2006, 02:08 AM   #15
raklo
Member
 
Registered: Apr 2006
Posts: 143

Original Poster
Rep: Reputation: 15
when i do that, i get

Code:
[root@pc-00064 proclist]# make
make -C /usr/src/linux-2.6.11.1 SUBDIRS = /root/proclist modules
make: *** empty variable name.  Stop.
make: *** [default] Error 2
also i want to make a module that can be insmod'ed and rmmod'ed,for which i have to add the line

Code:
obj-m:=proclist.o
while the code which u have sent does not have that line.

i'd like to know,how r u able to see the TABS that r not visible to me??(any special editor or tool???)

regards
rakesh

Last edited by raklo; 08-31-2006 at 02:11 AM.
 
  


Reply



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
.hal.0.cmd :2: Missing Separator neoAThome Ubuntu 0 12-27-2005 07:42 PM
spamassassin: makefile missing separator Andreja Linux - Software 1 05-31-2004 10:39 AM
Makefile:66: *** Cannot find a kernel config file. Stop NHBlacklabs Linux - Newbie 7 03-25-2004 04:03 AM
Makefile separator problem Ownasaurus Linux - Software 5 09-07-2003 01:07 PM
Missing Separator? jamespetts Linux - Software 2 09-05-2002 12:24 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:30 PM.

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