c - 2makefile:4: *** missing separator. Stop

4 Answers

You should always write command after a "tab" and not white space.

This applies to "gcc" line (line #4) in your case. You need to insert tab before gcc.

Also replace \rm -fr ll with "rm -fr ll". Insert tabs before this command too

makefile missing separator echo

This is my makefile:


  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?

The key point was "HARD TAB" 1. Check whether you used TAB instead of whitespace 2. Check your .vimrc for "set tabstop=X"

This is because tab is replaced by spaces. To disable this feature go to


and remove check for

"replace tab with space"

If you are using mcedit for makefile edit. you have to see the following mark.



c   makefile