[PATCH] Have make be more silent by default

Anton Lundin glance at acc.umu.se
Thu Jan 8 07:31:46 PST 2015


On 08 January, 2015 - Jef Driesen wrote:

> On 2015-01-06 22:33, Anton Lundin wrote:
> >--- a/Makefile.am
> >+++ b/Makefile.am
> >@@ -4,6 +4,7 @@ if ENABLE_EXAMPLES
> > SUBDIRS += examples
> > endif
> >
> >+AM_MAKEFLAGS = -s
> > ACLOCAL_AMFLAGS = -I m4
> 
> Although I like the idea, this patch doesn't work for me.
> 
> Without the patch, this is what I get:
> 
> $ make -C ../linux/
...
> 
> And with the patch:
> 
> $ make -C ../linux/
...
> 
> Only the lines starting with "make[3]:" are gone. If I pass the -s flag
> directly (even without the patch) the output is much less verbose:

Because when you call make with -C it adds a implicit -w , which means:
  -w, --print-directory       Print the current directory.

> 
> $ make -C ../linux/ -s
>  cd ../source && /bin/bash
> /home/jef/Projects/libdivecomputer/work/source/missing automake-1.14
> --foreign Makefile
>  cd . && /bin/bash ./config.status Makefile
> config.status: creating Makefile
> Making all in include
> Making all in libdivecomputer
> Making all in src
> Making all in examples
> 

Yes, because that suppresses the implicit -w.


The patch works if you're standing in your "linux" build-dir to begin
with.

We can use --no-print-directory if you would like to remove the
implicit -w, just, but thats a gnu-make flag, but who uses something
else nowadays?


//Anton


-- 
Anton Lundin	+46702-161604


More information about the devel mailing list