Linux: shell: bash: Makefile:5: *** missing separator. Stop.

如果从网上找这个的原因可能会找到一堆

https://til.linyiru.com/2018/04/make/missing-separator/

但是如果真的要看原因,就需要看make的文档或者是源代码。

比如源代码里有这么一段:

c 复制代码
@item missing separator.  Stop.
@itemx missing separator (did you mean TAB instead of 8 spaces?).  Stop.
This means that @code{make} could not understand much of anything
about the makefile line it just read.  GNU @code{make} looks for
various separators (@code{:}, @code{=}, recipe prefix characters,
etc.) to indicate what kind of line it's parsing.  This message means
it couldn't find a valid one.

#: src/read.c:1154
#, c-format
msgid "missing separator (did you mean TAB instead of 8 spaces?)"
msgstr "分隔符缺失 (你大概想用 TAB,而不是八个空格)"

#: src/read.c:1156
#, c-format
msgid "missing separator"
msgstr "缺失分隔符"

源代码,如果一行的开始多几个空格,就可能导致make读到EOL。因为前几个都是无意义的字符:空格。

c 复制代码
        /* If the word we're looking at is EOL, see if there's _anything_
           on the line.  If not, a variable expanded to nothing, so ignore
           it.  If so, we can't parse this line so punt.  */
        if (wtype == w_eol)
          {
            if (*p2 == '\0')
              continue;

            /* There's no need to be ivory-tower about this: check for
               one of the most common bugs found in makefiles...  */
            if (cmd_prefix == '\t' && strneq (line, "        ", 8))
              O (fatal, fstart, _("missing separator (did you mean TAB instead of 8 spaces?)"));
            else
              O (fatal, fstart, _("missing separator"));
          }
相关推荐
深念Y6 小时前
从 Windows 迁移到 Linux 开发环境的记录
linux·windows·链接·bun·ram·imdisk
领创工作室6 小时前
GitHub Workflows 全面解析:从核心概念到开源实现
运维·github
吕海洋7 小时前
目前可用的docker源2026.08
运维·docker·容器
知无不研7 小时前
Linux I/O复用之epoll
linux·服务器·epoll·socket编程
苏宸啊8 小时前
linux网络编程udp服务器和客户端代码编写(echo版本和字典版本)
linux·网络
~|Bernard|8 小时前
Linux 定时任务(Cron)完整教程
linux·运维·服务器
小周学学学9 小时前
vmware-horizon第一章:horizon服务器安装
运维·服务器·vmware
小雪崩9 小时前
嵌入式学习 day25:哈希表及排序与查找
linux·c语言·数据结构·学习·排序算法
gsls2008089 小时前
Penpot Docker 部署与 MCP 服务配置文档
运维·docker·容器·原型·penpot
九硕智慧建筑一体化厂家9 小时前
直流智能照明|全场景节能升级!打造安全低碳的智慧建筑光环境
运维·笔记·安全·智慧城市