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"));
          }
相关推荐
Wpa.wk几秒前
Docker - 搭建镜像仓库- 了解
运维·经验分享·测试工具·docker·容器
松涛和鸣4 分钟前
66、SPI驱动ADXL345加速度计
linux·运维·单片机·嵌入式硬件·ubuntu
无垠的广袤4 分钟前
【VisionFive 2 Lite 单板计算机】SoC 温度的 Home Assistant 物联网终端显示
linux·python·物联网
加油勇士12 分钟前
NGINX 参数配置与调优
运维·服务器·nginx
好学且牛逼的马13 分钟前
【Hot100|20-LeetCode 240. 搜索二维矩阵 II 】
linux·算法·leetcode
wenyi_leo19 分钟前
强大的claude code
linux·运维·服务器
zmjjdank1ng20 分钟前
Vim是什么?Vim和vi有什么关系
linux·编辑器·vim
嵌入小生00720 分钟前
数据结构基础内容 + 顺序表 + 单链表的学习---嵌入式入门---Linux
linux·数据结构·学习·算法·小白·嵌入式软件
hweiyu0020 分钟前
Linux 命令:join
linux
宇钶宇夕21 分钟前
CoDeSys入门实战一起学习(二十六):功能块(FBD)运算块与EN/ENO指令精讲及计数控制案例
运维·学习·自动化·软件工程