From: Masahiro Yamada Date: Wed, 18 Dec 2024 10:37:06 +0000 (+0900) Subject: kheaders: avoid unnecessary process forks of grep X-Git-Tag: v6.14-rc1~16^2~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=de0cae9273841ca019e438192d08b7358a002973;p=thirdparty%2Fkernel%2Flinux.git kheaders: avoid unnecessary process forks of grep Exclude include/generated/{utsversion.h,autoconf.h} by using the -path option to reduce the cost of forking new processes. No functional changes are intended. Signed-off-by: Masahiro Yamada --- diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh index a0e3fbf4afa42..c2eba1a0d772e 100755 --- a/kernel/gen_kheaders.sh +++ b/kernel/gen_kheaders.sh @@ -48,9 +48,9 @@ all_dirs="$all_dirs $dir_list" # check include/generated/autoconf.h explicitly. # # Ignore them for md5 calculation to avoid pointless regeneration. -headers_md5="$(find $all_dirs -name "*.h" | - grep -v "include/generated/utsversion.h" | - grep -v "include/generated/autoconf.h" | +headers_md5="$(find $all_dirs -name "*.h" -a \ + ! -path include/generated/utsversion.h -a \ + ! -path include/generated/autoconf.h | xargs ls -l | md5sum | cut -d ' ' -f1)" # Any changes to this script will also cause a rebuild of the archive.