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

How to Fix: Make error: missing separator

Missing separator in Makefile causes error. Stop.

Quick Answer: Check if the Makefile has a tab character at the beginning of each line, as this is the default separator for Makefiles.

The 'missing separator' error in Make is encountered when the Makefile attempts to execute a rule that does not contain a separator (such as a tab or space) between the target and the dependencies. This issue primarily affects users who are familiar with the traditional syntax of Makefiles.

This error can be frustrating, especially for developers who are accustomed to using other build systems. However, it is a relatively common mistake that can often be resolved by simply correcting the spacing in the Makefile.

🛑 Root Causes of the Error

  • The main reason why this error occurs is due to the lack of separators between the target and its dependencies in the Makefile. When Make encounters a rule without a separator, it assumes that the next line contains additional information about the rule and attempts to execute it as a separate command. This can lead to unexpected behavior and errors.
  • Another possible cause of this error is when using variable expansion within the Makefile. If variables are not properly quoted or escaped, they may be interpreted as part of the target or dependencies list, resulting in missing separators.

🛠️ Step-by-Step Verified Fixes

Correcting Spacing in the Makefile

  1. Step 1: Open the affected Makefile and locate the line containing the error.
  2. Step 2: Check that there are no spaces between the target and its dependencies. If necessary, add a tab character or other separator to fix the issue.
  3. Step 3: Verify that all variable expansions within the Makefile are properly quoted or escaped to prevent similar issues in the future.

Using Quotes to Resolve Variable Expansion

  1. Step 1: Identify any variable expansions within the affected rule or dependency list.
  2. Step 2: Wrap these variables in quotes (either single or double) to ensure they are treated as literal values rather than part of the target or dependencies list.
  3. Step 3: Test the corrected Makefile to verify that the issue has been resolved.

✨ Wrapping Up

Resolving the 'missing separator' error in Make typically involves correcting the spacing within the Makefile and ensuring proper variable expansion. By following these steps, users can quickly and easily resolve this common issue and get back to building their projects.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions