diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-11-13 11:29:34 +0100 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-11-16 01:07:32 +0100 |
commit | 9a234a2e384349f21afac8d718aa294a668ad4fa (patch) | |
tree | 43d0b8a9ca7c6aa953a0bf849e457813e3892108 /scripts/Makefile.modpost | |
parent | sh: select KBUILD_DEFCONFIG depending on ARCH (diff) | |
download | linux-9a234a2e384349f21afac8d718aa294a668ad4fa.tar.xz linux-9a234a2e384349f21afac8d718aa294a668ad4fa.zip |
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>
Diffstat (limited to 'scripts/Makefile.modpost')
0 files changed, 0 insertions, 0 deletions