找不到gnu make消息文件

历史邮票

我不知道为什么我从外壳程序中收到这些错误消息,或者它们从何而来?我简化了一个make文件。这是make文件simple.mk

 # simple trial makefile
    $(warning Making where CURDIR is $(CURDIR))
    $(warning  $(shell ls -ld "$(CURDIR)" ) )
    $(shell "ls -l $(CURDIR)" )
    $(shell "\ls -l /home/me/BitHoist/run/objects" )

我运行它。

me $ make -f simple.mk
simple.mk:2: Making where CURDIR is /home/me/BitHoist/source
simple.mk:3: drwxrwxr-x. 2 me me 4096 Apr 27 18:37 /home/me/BitHoist/source 
/bin/sh: ls -l /home/me/BitHoist/source: No such file or directory
/bin/sh: \ls -l /home/me/BitHoist/run/objects: No such file or directory
make: *** No targets.  Stop.
me $ 

我想出了一个解决方案,放在$(warning)中

我不知道为什么会收到这些错误消息?

/bin/sh: ls -l /home/me/BitHoist/source: No such file or directory
 /bin/sh: \ls -l /home/me/BitHoist/run/objects: No such file or directory

似乎是来自sh的错误消息。

罗伯特

疯狂的科学家

运行$(shell "ls -l $(CURDIR)" )就像"ls -l /home/me/BitHoist/source"在shell提示符下键入(包括引号)。

尝试一下,您将看到与生成文件相同的错误。Make将这些引号逐字传递到shell,因此shell试图运行一个字面名为的程序ls -l /home/me/BitHoist/source,该程序显然不是真实的程序名。因此,错误。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章