/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 |
First, use [code] to preserve indentation, as it is important for Makefiles. Your editor may be replacing the tabs with spaces automatically
|
> 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 |
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 |
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.
|
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 |
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 |
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. |
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),) 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 |
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 |
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 |
> 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),) |
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 |
what happens if you get rid of the if else and just do this..
Code:
KDIR := /usr/src/linux-2.6.11.1 |
when i do that, i get
Code:
[root@pc-00064 proclist]# make Code:
obj-m:=proclist.o 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 |
All times are GMT -5. The time now is 07:28 PM. |