【发布时间】:2016-02-12 21:29:36
【问题描述】:
我的make 命令有一个奇怪的行为。
它在执行前不打印命令行。
我知道-s、--silent 和--quiet 选项的存在,或者在命令行之前使用@。而且我一个都不用。
例如,一个非常基本的 Makefile:
all:
touch toto.txt
rm toto.txt
在我的电脑上执行:
mylogin@debian:~$ make
mylogin@debian:~$
在另一台计算机上执行:
mylogin@debian:~$ make
touch toto.txt
rm toto.txt
mylogin@debian:~$
这两台电脑上make的版本是一样的:
mylogin@debian:~$ make -version
GNU Make 3.81
...
打印命令行是默认行为(https://www.gnu.org/software/make/manual/html_node/Echoing.html),我没有使用任何特殊配置。
有人知道为什么我的make 执行但没有回显命令行吗?
PS:
- 我没有名为“all”的文件或目录
- 如果我删除
rm toto.txt,则创建的文件没有任何 make 回显。
PPS:
-
这些是我发出
make -d时的最后几行输出:Considering target file `all'. File `all' does not exist. Finished prerequisites of target file `all'. Must remake target `all'. Need a job token; we don't have children Putting child 0x01144970 (all) PID 7478 on the chain. Commands of `all' are being run. Live child 0x01144970 (all) PID 7478 Reaping winning child 0x01144970 PID 7478 Removing child 0x01144970 PID 7478 from chain. Considering target file `all'. File `all' was considered already.
【问题讨论】:
-
这里是
make -d输出:pastebin.com/kwt41E15。对我来说似乎没有任何问题。 -
我已将最后几行复制到您的答案中。它说它调用命令来制作
all目标,但没有显示它们;我认为应该。如果您想在这里帮助一些读者,请重试env LANG=en_US make -d。