作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在走过this教程,我必须在其中创建此 make
文件:
CFLAGS=-wall -g
clean:
rm -f ex1
当我输入此命令时:
$ make clean
我收到以下错误:
make: *** No rule to make target `clean'. Stop.
我确定我正在使用 TABS。为什么我会收到此错误?怎么解决呢?
最佳答案
这里的问题,正如帖子中的一些评论所表明的那样,您将文件命名为 make
而不是传统的 Makefile
(或备用名称 GNUMakefile GNU make 支持的
和 makefile
)。
参见What Name to Give Your Makefile在 GNU make 手册中。
如果您想使用备用名称(例如 make
),那么您需要告诉 make
使用 -f
来使用该文件标志(也在手册的该部分中提到)。
make -f make
缺少分隔符
错误是由 makefile 中的缩进不正确引起的。配方行等上用空格代替制表符。
关于c - 让: *** No rule to make target `clean' .停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31704764/
我是一名优秀的程序员,十分优秀!