如何转储makefile的聚合输出?

时间:2012-03-14 18:18:21

标签: makefile

我正在开展一个项目。 makefile非常复杂,因为它包含多个其他makefile,其中还包含其他更多makefile。我想将所有包含的makefile转储到一个文件中。我怎样才能做到这一点?是否有类似于C预处理转储的内容,例如'-E'?

2 个答案:

答案 0 :(得分:1)

make -p     # GNU Make
nmake -p    # Microsoft Make
make -h     # help
make -d     # debug
make -n     # just print

从一个简单的例子开始,然后从那里开始工作。当你对Make不了解任何事情时,从一个大的Makefile开始并不是一个好主意。

答案 1 :(得分:0)

您可以尝试make --dry-run

`-n'
`--just-print'
`--dry-run'
`--recon'
"No-op". The activity is to print what commands would 
         be used to make the targets up to date, but 
         not actually execute them.