]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
kbuild: shrink .cache.mk when it exceeds 1000 lines
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 13 Oct 2017 11:25:29 +0000 (20:25 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 13 Nov 2017 13:54:24 +0000 (22:54 +0900)
commite17c400ae194945eef9d9cae38a321c92c1986fb
tree9de564f8ab166f9c638558e4f5487fc84d3ebe98
parent433dc2ebe7d17dd21cba7ad5c362d37323592236
kbuild: shrink .cache.mk when it exceeds 1000 lines

The cache files are only cleaned away by "make clean".  If you continue
incremental builds, the cache files will grow up little by little.
It is not a big deal in general use cases because compiler flags do not
change quite often.

However, if you do build-test for various architectures, compilers, and
kernel configurations, you will end up with huge cache files soon.

When the cache file exceeds 1000 lines, shrink it down to 500 by "tail".
The Least Recently Added lines are cut. (not Least Recently Used)
I hope it will work well enough.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
scripts/Kbuild.include