# Make: Makefile:5: *** missing separator. Stop. (spaces instead of a tab)

**Code:** `missing separator` · **Category:** C/C++ · **Seen on:** C/C++, Make

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.

## 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

1. Replace the leading spaces on the reported line with one TAB
2. Configure your editor to use real tabs for Makefiles
3. Check the line above for a missing `:` or `\`

## Detailed fix by platform

### Linux

1. Reveal tabs: `cat -A Makefile | sed -n '1,20p'` (tabs show as ^I)
2. Convert indentation: `sed -i 's/^        /\t/' Makefile` (8 spaces to a tab)

### Editor

1. VS Code: set "editor.insertSpaces": false for the `makefile` language

## Code examples

### Tab-indented recipe

```make
all: app

app: main.o
	gcc -o app main.o        # <-- this indentation must be a TAB

clean:
	rm -f app *.o
```

`cat -A` shows a tab as ^I; four or eight spaces mean the file needs fixing.

## How to diagnose

1. **Line** — Which line number is reported?
2. **Whitespace** — Tab or spaces?
3. **Syntax** — Missing colon or equals above?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/cpp/make-missing-separator)
