首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >生成错误:"make[1]:* [directories] Error 1“

生成错误:"make[1]:* [directories] Error 1“
EN

Stack Overflow用户
提问于 2013-03-07 22:35:37
回答 1查看 6.6K关注 0票数 1

当我试图在一个复杂的makefile上运行"make all“时,我得到了这样的错误:

代码语言:javascript
复制
C:\BITCLOUD\BitCloud_PS_SAM3S_EK_1_10_0\BitCloud_PS_SAM3S_EK_1_10_0\Applications\ZAppSi\Dem o\SEDevice>make all 
make -C makefiles/PC -f Makefile_PC_Gcc all APP_NAME=DemoSE
make[1]: Entering directory
'C:/BITCLOUD/BitCloud_PS_SAM3S_EK_1_10_0/BitCloud_PS_SAM3S_EK_1_10_0/Applications/ZAppSi/Demo/SEDevice/makefiles/PC'
A sintaxe do comando está incorrecta.
make[1]: *** [directories] Error 1
make[1]: Leaving directory
'C:/BITCLOUD/BitCloud_PS_SAM3S_EK_1_10_0/BitCloud_PS_SAM3S_EK_1_10_0/Applications/ZAppSi/Demo/SEDevice/makefiles/PC'
make: *** [all] Error 2

线在哪里

代码语言:javascript
复制
A sintaxe do comando está incorrecta.  

翻译成英语的意思是:“命令的语法不正确”

我已经尝试将项目更改到不同的目录,检查文件名中的空格,使用GNU make和MinGW make (mingw32-make),结果对两个"make“都是一样的。我还检查了makefile中包含的所有文件,并且它们是对应的。

我不是makefile方面的专家,所以我在寻求帮助。当make抛出这种类型的错误时,发生的主要问题是什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-03-07 23:56:40

抛出此错误的很可能不是make,而是make执行的命令返回非零退出状态,在本例中状态为1(由于错误1);然后顶层make停止并返回错误2。请注意,默认情况下,只要命令失败,make就会停止。由于输出不会显示执行的是哪个命令,因此没有办法确切地指出哪里出了问题。

编辑:来自GNU make手册:

-d Print debugging information in addition to normal processing. The debugging information says which files are being considered for remaking, which file-times are being compared and with what results, which files actually need to be remade, which implicit rules are considered and which are applied---everything inter‐ esting about how make decides what to do. --debug[=FLAGS] Print debugging information in addition to normal processing. If the FLAGS are omitted, then the behavior is the same as if -d was specified. FLAGS may be a for all debugging output (same as using -d), b for basic debugging, v for more verbose basic debugging, i for showing implicit rules, j for details on invo‐ cation of commands, and m for debugging while remaking make‐ files.

我建议运行make --debug=j来查看命令。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15273904

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档