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"));
          }
相关推荐
上海合宙LuatOS1 分钟前
LuatOS ——Modbus RTU 通信模式
java·linux·服务器·开发语言·网络·嵌入式硬件·物联网
新时代牛马7 分钟前
CANopen 协议详解
linux·微信
Francek Chen9 分钟前
【大数据基础】实验1:熟悉常用的Linux操作和Hadoop操作
大数据·linux·hadoop·hdfs
南林yan10 分钟前
通过lspci和lsusb理解PCI设备和USB设备
linux
虾..11 分钟前
Linux 多线程,线程分离
linux·运维·服务器
云飞云共享云桌面17 分钟前
推荐一些适合10个SolidWorks设计共享算力的服务器硬件配置
运维·服务器·前端·数据库·人工智能
hampeter21 分钟前
【填坑指南】Trae/VS Code 远程连接 Ubuntu,终端总是自动激活特定的 Conda 环境?三招教你彻底解决!
linux·ubuntu·conda·trae
DO_Community22 分钟前
如何选择对象存储?Amazon S3 与 DigitalOcean Spaces 深度解析
运维·服务器·ai·aws·对象存储·云服务·金融科技
ZCXZ12385296a32 分钟前
物流自动化环境下的纸箱检测与识别_YOLO13-SEG-REPVGGOREPA模型应用
运维·自动化
2401_8322981034 分钟前
安卓证书在线生成,一键签名・安全高效
运维