当前位置:网站首页>Makefile missing separator. Stop.怎么解决「建议收藏」
Makefile missing separator. Stop.怎么解决「建议收藏」
2022-08-10 12:52:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
- 现象
在makefile中写入:
all: clean comp
clean:
./clean.csh
comp:
./run_tc
命令行的背景显示为红色。
运行makefile 提示:makefile 3 missing separator.stop:
检查了一番发现,有几个原因会引起这样的结果:
第一:makefile的命令行,开头必须用tab键,目前没有发现tabstop的设定值的不同,会引起error。例如:
set tabstop=3(默认) OR set tabstop=4等,均可以。
第二:编码方式引起的原因。这个原因不多见,不容易发现。查看/etc/vimrc文件以及~/.vimrc,查看是否有set fileencodings的选项,是否设定了utf-8。没有的话加上。
***********************************************************************************************
- 扩展
*************************************************************************************************
Makefile missing separator. Stop.如何解决 Makefile:1: *** missing separator. Stop. makefile 如下
makefile missing?separator? stop makefile常见错误
[解决办法]
这个makefile里不要乱用TAB,只有命令所在的行才能且只能以TAB开头!
其他的如,make变量的定义、赋值,make内定函数如$(error "strings")都不能以TAB开头,不然make会将其作为命令来处理!
[解决办法]
1.第一行ifnep这个符号是做什么的?大概是ifneq吧?
2.很多地方你打的是空格,你最好尝试习惯去用tab键
3.第八行和第十行必须用tab开头
ifneq ($(KERNELRELEASE),)
obj-m += module.o
else
PWD := $(shell pwd)
KVER := $(shell uname -r)
KDIR := /lib/modules/$(KVER)/build
all:
$(MAKE) -C $(KDIR) M= $(PWD)
clean:
rm -rf *.o *.mod.c *.ko *.symvers *.order *.makers
endif
[解决办法]
如果排除了TAB用空格代替的问题后、以及由中文“:”等问题后,问题还存在
那么很可能是文件编码格式的问题
查看一下Makefile 文件编码格式是不是utf-8的,还带有BOM标记在文件头
$ xxd -l 16 Makefile
0000000: efbb bf61 6c6c 3a0a 2020 6563 686f 2068 ...all:.
去掉红色字体部分就OK了
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/129978.html原文链接:https://javaforall.cn
边栏推荐
- 【目标检测】小脚本:提取训练集图片与标签并更新索引
- A unit test report for CRM One Order Application log
- 递归递推之递归的函数
- ArcMAP has a problem of -15 and cannot be accessed [Provide your license server administrator with the following information:Err-15]
- 娄底干细胞制备实验室建设须知要求
- 【ECCV 2022|Millions of Prizes】PSG Competition: Pursuing the "Most Comprehensive" Scene Understanding
- Loudi Center for Disease Control and Prevention Laboratory Design Concept Description
- YTU 2295: KMP pattern match one (string)
- 【百度统计】用户行为分析
- Nanodlp v2.2/v3.0光固化电路板,机械开关/光电开关/接近开关的接法和系统状态电平设置
猜你喜欢
2022-08-09:以下go语言代码输出什么?A:否,会 panic;B:是,能正确运行;C:不清楚,看投票结果。 package main import ( “fmt“ “syn
【ECCV 2022|Millions of Prizes】PSG Competition: Pursuing the "Most Comprehensive" Scene Understanding
BEVDet4D: Exploit Temporal Cues in Multi-camera 3D Object Detection 论文笔记
Short read or OOM loading DB. Unrecoverable error, aborting now
LeetCode中等题之比较版本号
shell:常用小工具(sort、uniq、tr、cut)
M²BEV: Multi-Camera Joint 3D Detection and Segmentation with Unified Bird’s-Eye View Representation
中科院深圳先进技术院合成所赵国屏院士组2022年招聘启事
mSystems | Zhongnong Wang Jie Group Reveals the Mechanisms Affecting Soil "Plastic Interstitial" Microbial Communities
Short read or OOM loading DB. Unrecoverable error, aborting now
随机推荐
友邦人寿可观测体系设计与落地
Fragment's show and hide
Ethernet channel 以太信道
用低代码驱动IT现代化
递归递推之计算组合数
LeetCode中等题之颠倒字符串中的单词
ArcMAP has a problem of -15 and cannot be accessed [Provide your license server administrator with the following information:Err-15]
Solution for "Certificate not valid for requested usage" after Digicert EV certificate signing
Detailed explanation of es6-promise object
es6-promise对象详解
NodeJs原理 - Stream(二)
YTU 2295: KMP pattern match one (string)
递归递推之Fighting_小银考呀考不过四级
【ECCV 2022|百万奖金】PSG大赛:追求“最全面”的场景理解
金山云要飘到哪里?
【mysql索引实现原理】
BEVDet4D: Exploit Temporal Cues in Multi-camera 3D Object Detection 论文笔记
Jenkins修改默认主目录
SenseTime self-developed robotic arm, the first product is an AI chess-playing robot: Guo Jingjing is also invited as an endorsement
Calculate the number of combinations recursively