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"));
          }
相关推荐
资讯第一线27 分钟前
Windows系统工具:WinToolsPlus 之 SQL Server 日志清理
运维
xiaomu_34729 分钟前
基于Linux系统docker封装exe
linux·运维·服务器·docker
二进制的Liao30 分钟前
【数据分析】什么是鲁棒性?
运维·论文阅读·算法·数学建模·性能优化·线性回归·负载均衡
π大星星️2 小时前
Jenkins 工作流程
运维·jenkins
Juicedata2 小时前
JuiceFS v1.3-Beta2:集成 Apache Ranger,实现更精细化的权限控制
运维·人工智能·ai
IT成长日记3 小时前
05【Linux经典命令】Linux 用户管理全面指南:从基础到高级操作
linux·运维·服务器·用户管理·命令
资讯第一线7 小时前
Windows系统工具:WinToolsPlus 之 SQL Server Suspect/质疑/置疑/可疑/单用户等 修复
运维
惊起白鸽4507 小时前
LVS负载均衡
运维·负载均衡·lvs
Sapphire~8 小时前
Linux-07 ubuntu 的 chrome 启动不了
linux·chrome·ubuntu
伤不起bb9 小时前
NoSQL 之 Redis 配置与优化
linux·运维·数据库·redis·nosql