Make: Makefile:5: *** missing separator. Stop. (spaces instead of a tab)
A line in the Makefile is neither a rule, a variable assignment nor a tab-indented command — nearly always spaces used where a TAB is required.
missing separatorMakefile:5: *** missing separator. Stop.*** missing separator (did you mean TAB instead of 8 spaces?)recipe commences before first targetMakefile:2: *** commands commence before first target Meaning
In a Makefile, the commands under a rule must start with a real tab character. Editors that convert tabs to spaces, copy-pasted examples and YAML-style indentation break it. GNU Make may add "Did you mean TAB instead of 8 spaces?" in newer versions.
Common causes
- Recipe lines indented with spaces instead of a tab
- Editor setting "insert spaces" or automatic tab conversion
- Missing
:after a target name or=in an assignment - Merge-conflict markers or stray text in the Makefile
⚡ Quick fix
- Replace the leading spaces on the reported line with one TAB
- Configure your editor to use real tabs for Makefiles
- Check the line above for a missing
:or\
Detailed fix by platform
Linux
- Reveal tabs:
cat -A Makefile | sed -n '1,20p'(tabs show as ^I) - Convert indentation:
sed -i 's/^ /\t/' Makefile(8 spaces to a tab)
Editor
- VS Code: set "editor.insertSpaces": false for the
makefilelanguage
Code examples
Tab-indented recipe
all: app
app: main.o
gcc -o app main.o # <-- this indentation must be a TAB
clean:
rm -f app *.ocat -A shows a tab as ^I; four or eight spaces mean the file needs fixing.
How to diagnose
- Line — Which line number is reported?
- Whitespace — Tab or spaces?
- Syntax — Missing colon or equals above?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Could not find a package configuration file CMake Error: Could not find a package configuration file provided by "Foo" (requested version 1.2)
- fatal error: No such file or directory C/C++: fatal error: foo.h: No such file or directory — #include not found
- No rule to make target Make: *** No rule to make target 'foo.c', needed by 'foo.o'. Stop.
Most viewed in C/C++
- terminate called after throwing an instance of C++: terminate called after throwing an instance of 'std::out_of_range' — what(): vector::_M_range_check
- double free or corruption C/C++: free(): double free detected / double free or corruption (out) — Aborted (core dumped)
- expected ';' before C/C++: error: expected ';' before 'x' — missing semicolon
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 15 Oct 2026