[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Suppress "is up to date" log?

From: Masahiro Yamada
Subject: Re: Suppress "is up to date" log?
Date: Mon, 7 Nov 2022 10:53:56 +0900


On Mon, Nov 7, 2022 at 12:48 AM Kaz Kylheku <> wrote:
> On 2022-11-06 02:28, Masahiro Yamada wrote:
> > Is there a solution to suppress this 'up to date' log?
> Hi, Masahiro,
> Use make -s.  That option also suppresses the printing of
> the recipe commands that are being executed. However, that
> is not a problem for a makefile which already hides them
> with the @ character, and performs its own customized printing.

The -s option hides everything, so it is not a solution.

See the test case in my previous email.

"make baz bar" _did_ update bar.

Why does Make pretend like
"'bar' had already been up-to-date before the command invocation" ?

Make is giving *invalid* information.

Do you see my point?

>   0:[1106:073304]:sun-go:~/txr$ make all
>   make: Nothing to be done for 'all'.
>   0:[1106:073306]:sun-go:~/txr$ make -s
>   0:[1106:073307]:sun-go:~/txr$ touch eval.c stdlib/
>   0:[1106:073318]:sun-go:~/txr$ make -s
>   CC eval.c -> opt/eval.o
>   LINK opt/txr.o [.. SNIP ...] opt/gzio.o -> txr
>   TXR stdlib/ -> stdlib/optimize.tlo
>   0:[1106:073325]:sun-go:~/txr$ make -s
>   0:[1106:073327]:sun-go:~/txr$
> Unfortunately, I see that the kernel Makefile is too clever;
> when you run make -s, it obeys that and suppresses its
> custom output like:
>   CC      init/version.o
>   LD      init/built-in.o
>   LD      vmlinux.o
> Maybe there is a way to opt-in to that output in spite of
> make -s?

No, that is not an option.

With -s option, Kbuild deliberately suppresses everything except
error/warning messages.

Some people (especially those who work in continuous integration)
think it is very useful; if "make -s" outputs zero log,
the kernel build succeeded without any warning.

Linus is very picky about any build warning.

> (I work in embedded, so I'm not on the latest kernel;
> I'm doing everything here with 4.9.)
> I see that in tools/build/, it is checking
> for -s being in MAKEFLAGS and manipulating the quiet
> variable. This works for me:
>   make -s quiet=quiet_

"quiet" is used as an internal variable.
Not intended for a tweak from the command line.

> The check for -s in MAKEFLAGS is done in a way that
> the user's V variable is ignored. At a glance, I don't
> see any deliberate interface for overriding that; so
> I resorted to overriding the quiet variable with the
> correct internal value to get the default abbreviated
> comand printing mode.

As I said, this is an intended behavior.
Kbuild takes -s precedence over V= option
because -s is a strong demand
"Please suppress logs except error/warning".

> Cheers ...


Best Regards
Masahiro Yamada

reply via email to

[Prev in Thread] Current Thread [Next in Thread]