Skip to content

/errors/make/missing-separator

make: Makefile:2: *** missing separator. Stop.

The commands on this page have not been executed by our verification runner yet.updated 2026-10-20
tool
Make
exit code
2
versions
GNU make 3.82+, GNU make 4.x
os
any

Every command in a Makefile rule, the recipe, must start with a tab character. When a recipe line starts with spaces, GNU make cannot tell what the line is and stops:

text
Makefile:2: *** missing separator.  Stop.

2 is the line number. GNU make 4 adds a hint when the line starts with eight spaces: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.

Find and fix space-indented lines

bash
grep -nP '^ +' Makefile               # lines starting with spaces
cat -A Makefile | grep -n '^ '        # cat -A shows tabs as ^I
sed -i -E 's/^ {4}/\t/' Makefile      # replace 4 leading spaces with a tab (check the result)

A correct rule, with a tab before $(CC):

makefile
app: main.c
	$(CC) -o app main.c

Keep editors from converting tabs

vim
" ~/.vimrc
autocmd FileType make setlocal noexpandtab
VS Code settings.json
"[makefile]": { "editor.insertSpaces": false }

No tabs at all

makefile
.RECIPEPREFIX = >
app: main.c
> $(CC) -o app main.c

Sources