help-make
[Top][All Lists]
Advanced

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

Suppress "is up to date" log?


From: Masahiro Yamada
Subject: Suppress "is up to date" log?
Date: Sun, 6 Nov 2022 19:28:13 +0900

[Motivation]

My main interest is the Linux kernel build system (Kbuild).
Kbuild strives to suppress annoying logs such as
"is up date", "Nothing to be done for", etc.


However, there is a case where I cannot suppress the "is up date" log.

The following are real use cases when building the Linux kernel.


  $ make -j24 vmlinux bzImage
    DESCEND objtool
    CALL    scripts/checksyscalls.sh
  Kernel: arch/x86/boot/bzImage is ready  (#2)


  $ make -j24 bzImage vmlinux
    DESCEND objtool
    CALL    scripts/checksyscalls.sh
  make: 'vmlinux' is up to date.
  Kernel: arch/x86/boot/bzImage is ready  (#2)


The difference between the two is the cmdline order of "vmlinux" and "bzImage".
The latter shows "'vmlinux' is up to date'" because bzImage depends on vmlinux
(but you never know that fact until you parse the complicated Makefiles).

Also, there is no point to say "make vmlinux bzImage" is preferrable over
"make bzImage vmlinux".


[Simple test case]

If you want to see simpler test code, here:


$ cat Makefile
foo: FORCE
        touch $@

bar: foo FORCE
        cp $< $@

baz: bar FORCE
        cp $< $@

.PHONY: FORCE


$ make bar baz
touch foo
cp foo bar
cp bar baz

$ make baz bar
touch foo
cp foo bar
cp bar baz
make: 'bar' is up to date.




I do not see any justification for "is up to date" log.

What the user is asking to Make is to update 'bar' and 'baz'.
He does not (need to) know the dependency between 'bar' and 'baz'.


Is there a solution to suppress this 'up to date' log?



-- 
Best Regards
Masahiro Yamada



reply via email to

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