Files
kernel_xiaomi_raphael/scripts
Masahiro Yamada 0a2c366a20 kbuild: create directory for make cache only when necessary
Currently, the existence of $(dir $(make-cache)) is always checked,
and created if it is missing.

We can avoid unnecessary system calls by some tricks.

[1] If KBUILD_SRC is unset, we are building in the source tree.
    The output directory checks can be entirely skipped.
[2] If at least one cache data is found, it means the cache file
    was included.  Obviously its directory exists.  Skip "mkdir -p".
[3] If Makefile does not contain any call of __run-and-store, it will
    not create a cache file.  No need to create its directory.
[4] The "mkdir -p" should be only invoked by the first call of
    __run-and-store

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
2021-08-11 09:00:02 +00:00
..
2017-03-28 16:16:52 +02:00
2019-12-17 21:13:36 +01:00
2021-06-03 08:36:11 +02:00
2021-06-03 08:36:11 +02:00
2021-06-03 08:36:11 +02:00