Coding⏱️ 3 min read📅 2026-06-03

How to Fix: makefile:4: *** missing separator. Stop

Fix missing separator in Makefile for clean and make commands.

Quick Answer: The issue is caused by the dollar sign ("  ") being used as a literal character instead of a variable expansion. Replace $@ with @ and $< with <.

The error 'makefile:4: *** missing separator. Stop' occurs when the Makefile is unable to parse the commands due to an invalid character or syntax issue.

This issue affects users who attempt to run the 'make clean' or 'make make' commands, resulting in a compilation error.

🔍 Why This Happens

  • The primary cause of this error is the presence of an unescaped dollar sign ($), which is not a valid character for the Makefile. This character is often used as a variable expansion operator.
  • Another possible reason for this issue is the incorrect use of special characters, such as the less-than symbol (<) or greater-than symbol (>) in the Makefile commands.

🔧 Proven Troubleshooting Steps

Using the Correct Syntax

  1. Step 1: To fix this issue, ensure that all dollar signs ($), angle brackets (< and >), and pipes (|) are properly escaped using backslashes or quotes.
  2. Step 2: Check your Makefile for any invalid characters or syntax issues. Replace any incorrect syntax with the correct syntax to avoid this error.
  3. Step 3: Verify that all variables are defined correctly in the Makefile. If a variable is not defined, remove it from the command or define it before using it.

Checking for Escaped Characters

  1. Step 1: Carefully review your Makefile commands to ensure that no escaped characters are used incorrectly.
  2. Step 2: Replace any escaped characters with their unescaped counterparts. For example, replace \$ with $ or " with '.

✨ Wrapping Up

To resolve the 'makefile:4: *** missing separator. Stop' error, follow the steps outlined in Method 1: Using the Correct Syntax. If you are still experiencing issues, review your Makefile for any escaped characters and apply corrections accordingly.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions