makefile:4: *** missing separator. Stop
来源:互联网 发布:如何建立图片数据库 编辑:程序博客网 时间:2024/05/21 21:01
up vote29down votefavorite
12
This is my makefile:
all:llll:ll.c gcc -c -Wall -Werror -02 c.c ll.c -o ll $@ $<clean : \rm -fr ll
When I try to make clean
or make make
, I get this error:
:makefile:4: *** missing separator. Stop.
How can I fix it?
c makefile
add a comment
3 Answers
activeoldestvotes
up vote83down vote
makefile has a very stupid relation with tabs , all actions of every rule are identified by tabs ...... and No 4 spaces dont make a tab , only a tab makes a tab...
to check i use the command cat -e -t -v makefile_name
it shows the presence of tabs with ^I and line endings with $ both are vital to ensure that dependencies end properly and tabs mark the action for the rules so that they are easily identifiable to the make utility.....
example :
Kaizen ~/so_test $ cat -e -t -v mk.tall:ll$ ## here the $ is end of line ... $ll:ll.c $^Igcc -c -Wall -Werror -02 c.c ll.c -o ll $@ $<$ ## the ^I above means a tab was there before the action part, so this lines ok . $clean :$ \rm -fr ll$## see here there is no ^I which means , tab is not present .... ## in this case you need to open the file again and edit/ensure a tab ## starts the action part
hope this helps !!
0 0
- makefile:4: *** missing separator. Stop
- makefile:4: *** missing separator. Stop.
- makefile:4: *** missing separator. Stop.
- makefile: *** missing separator. Stop
- Makefile:3: *** missing separator. Stop.
- Makefile:2:*** missing separator. Stop
- "makefile:5: *** missing separator. Stop."
- Makefile:3: *** missing separator. Stop.
- Makefile:13: *** missing separator. Stop.
- Makefile:3: *** missing separator. Stop.
- Makefile:19: *** missing separator. Stop
- Makefile:2:*** missing separator. Stop.
- Makefile:2: missing separator. Stop.
- Makefile:3:*** missing separator. Stop.
- Makefile:2:*** missing separator. Stop
- Makefile:3: *** missing separator. Stop.
- Makefile:9: *** missing separator. Stop.
- makefile:3: *** missing separator. Stop.
- 杭电ACM1015——Safecracker
- String、Integer、StringBuffer和API类中的常用方法
- D3js 获取X,Y轴坐标
- 2012年5月SAT香港真题解析
- JAVA学习第四天
- makefile:4: *** missing separator. Stop
- 彻底学习STL中的Allocator
- 典型的Java Web程序包含的内容
- 关于无法下载android开发工具的解决方法
- pat 1005. Spell It Right (20)
- Jsp抛出异常org.apache.jasper.JasperException
- 2012年5月SAT香港真题解析
- ios引导页图片尺寸
- 常用正则表达式