Alex
Alex

Reputation: 1631

Control GNU autotools make output

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.

Upvotes: 1

Views: 913

Answers (3)

ephemient
ephemient

Reputation: 204668

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.

Upvotes: 3

William Pursell
William Pursell

Reputation: 212158

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.

Upvotes: 3

Hamish Grubijan
Hamish Grubijan

Reputation: 10820

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 ...

Upvotes: 1

Related Questions