Control GNU autotools make output

假如想象 提交于 2019-12-24 06:29:09

问题


I am using GNU autoconf/automake. Is there any way I can control what make prints to stdout from configure.ac or Makefile.am? For example, suppress mv and cp commands being printed out to the screen, only print the name of the file being compiled by gcc rather than the whole command line, highlight gcc warnings in some way.


回答1:


Is Prettify Automake what you want?


Edit: As of Automake 1.10b, silent-rules is built-in. Not the same code or style but similar in effect.




回答2:


Modern Automake (after in 1.10b) supports --silent-rules which will suppress the full compile command. (eg, output is "CC foo" instead of "gcc -DHAVE_CONFIG_H ...") That may be all you need. You need to add "silent-rules" to AM_INIT_AUTOMAKE and pass --enable-silent-rules to configure (or put it in CONFIG_SITE) to enable the feature. See the automake docs for details.




回答3:


I believe the easiest thing is to write a wrapper script which runs *make and parses the output. I believe I have seen this being done in Ubuntu somewhere ...



来源:https://stackoverflow.com/questions/1970796/control-gnu-autotools-make-output

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!