summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-08-28 11:39:54 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2022-09-29 04:40:15 +0900
commita55f283e8b473a3124705934a17d0ad61e34e6c1 (patch)
tree5d60604e4c9919b9d0ae6f860ee2e2ec237b913a /Makefile
parent2df8220cc511326508ec4da2f43ef69311bdd7b9 (diff)
downloadlwn-a55f283e8b473a3124705934a17d0ad61e34e6c1.tar.gz
lwn-a55f283e8b473a3124705934a17d0ad61e34e6c1.zip
kbuild: generate include/generated/compile.h in top Makefile
Now that UTS_VERSION was separated out, this header can be generated much earlier, and probably the top Makefile is a better place to do it than init/Makefile. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 8536404529a5..f9756ff7c750 100644
--- a/Makefile
+++ b/Makefile
@@ -1194,7 +1194,7 @@ PHONY += prepare archprepare
archprepare: outputmakefile archheaders archscripts scripts include/config/kernel.release \
asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h \
- include/generated/autoconf.h remove-stale-files
+ include/generated/compile.h include/generated/autoconf.h remove-stale-files
prepare0: archprepare
$(Q)$(MAKE) $(build)=scripts/mod
@@ -1256,6 +1256,12 @@ $(version_h): FORCE
include/generated/utsrelease.h: include/config/kernel.release FORCE
$(call filechk,utsrelease.h)
+filechk_compile.h = $(srctree)/scripts/mkcompile_h \
+ "$(UTS_MACHINE)" "$(CONFIG_CC_VERSION_TEXT)" "$(LD)"
+
+include/generated/compile.h: FORCE
+ $(call filechk,compile.h)
+
PHONY += headerdep
headerdep:
$(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \