kheaders: optimize md5sum calculation for in-tree builds
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 8 Oct 2019 12:05:53 +0000 (21:05 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 11 Nov 2019 11:10:01 +0000 (20:10 +0900)
commit0e11773e76098729552b750ccff79374d1e62002
treef484cf8ce2bd6ec9b3e4e47c8b65f06ddd056859
parent9a066357184485784f782719093ff804d05b85db
kheaders: optimize md5sum calculation for in-tree builds

This script computes md5sum of headers in srctree and in objtree.
However, when we are building in-tree, we know the srctree and the
objtree are the same. That is, we end up with the same computation
twice. In fact, the first two lines of kernel/kheaders.md5 are always
the same for in-tree builds.

Unify the two md5sum calculations.

For in-tree builds ($building_out_of_srctree is empty), we check
only two directories, "include", and "arch/$SRCARCH/include".

For out-of-tree builds ($building_out_of_srctree is 1), we check
4 directories, "$srctree/include", "$srctree/arch/$SRCARCH/include",
"include", and "arch/$SRCARCH/include" since we know they are all
different.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
kernel/gen_kheaders.sh