这与如何跟踪 Makefile 目标进行故障排除有关?我正在使用旧的 PowerMac G5。它之所以存在,是因为我用它来测试较旧的编译器和大端、PowerPC。
我试图确定 makefile 中的哪一行导致了unexpected EOF while looking for matching ``'. 我们的makefile 不使用反引号(我们添加它们是为了测试这个问题);对于具有 1000 行的 makefile 来说,尝试/错误和猜测的速度太慢。
当我运行 make with 时--debug,它无法打印行号:
$ make --debug=a
GNU Make 3.82
Built for powerpc-apple-darwin9.8.0
...
Reading makefiles...
Reading makefile `GNUmakefile'...
bash: -c: line 0: unexpected EOF while looking for matching ``'
bash: -c: line 1: syntax error: unexpected end of file
bash: -c: line 0: unexpected EOF while looking for matching ``'
bash: -c: line 1: syntax error: unexpected end of file
bash: -c: line 0: unexpected EOF while looking for matching ``'
bash: -c: line 1: syntax error: unexpected end of file
bash: -c: line 0: unexpected EOF while looking for matching ``'
bash: -c: line 1: syntax error: unexpected end of file
Updating makefiles...
...
Run Code Online (Sandbox Code Playgroud)
make --help似乎没有讨论它:
$ make --help 2>&1 | grep -i line
$
Run Code Online (Sandbox Code Playgroud)
我的第一个问题是,如何告诉 GNU make 打印行号?
我的第二个问题是,一个自 make 以来就存在的程序在调试支持方面怎么会如此蹩脚?
| 归档时间: |
|
| 查看次数: |
4698 次 |
| 最近记录: |