Why does make echo every command it runs to the screen?

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Fri Jul 14 16:07:29 UTC 2006


On Fri, Jul 14, 2006 at 06:13:16AM -0400, Jason Spiro wrote:
> Why does make, by default, echo every command it runs to the screen?
> 
> Wouldn't it be better if it did not, and instead gcc echoed the full
> pathname of all files that caused errors or warnings while compiling?
> 
> Sounds to me such a way would be more in tune with the old Unix
> philosophy of commands not displaying any output to the screen unless
> there's a problem.

It is easier to debug the Makefile when it by default sows what it is
doing.  You can ask it to not do so in your Makefile, and the linux 2.6
kernels do that for example.  By default they print out CC... and LD...
and other such status but not the actual command.  Adding V=1 to the
maek command line enables printing the actual commands again.

It's just a default, feel free to override it in your makefiles.  I have
found many makefiles that do this to be very very badly written, so I
think most people that want to hide the output are simply trying to hide
their crappy makefiles. :)

--
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list