1

当我尝试在具有一定复杂性的 makefile 上运行“make all”时,出现以下错误:

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

哪里行

A sintaxe do comando está incorrecta.  

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

我已经尝试将项目更改为不同的目录,检查文件名中的空格,使用 GNU make 并使用 MinGW make (mingw32-make),结果与“make”相同。我还检查了 makefile 中包含的所有文件并且它们对应。

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

4

1 回答 1

1

可能不会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以查看命令。

于 2013-03-07T15:56:40.380 回答