summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-05-01 15:01:41 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2020-05-26 00:03:15 +0900
commit3044dd05289d6c768c7c5d00f58208fc1f3927f3 (patch)
tree08ff771366559ed4bfe008ac0270e6fb89d303fe /Makefile
parent88a8e278ff0b6b461bf39d4ace17384e976a3f3f (diff)
downloadlwn-3044dd05289d6c768c7c5d00f58208fc1f3927f3.tar.gz
lwn-3044dd05289d6c768c7c5d00f58208fc1f3927f3.zip
kbuild: invoke syncconfig if autoconf.h is missing
If include/generated/autoconf.h is accidentally lost somehow, there is no clear way to fix it. Make it self-healing. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index faec37f23c48..e329bd4a0f17 100644
--- a/Makefile
+++ b/Makefile
@@ -698,7 +698,7 @@ $(KCONFIG_CONFIG):
# This exploits the 'multi-target pattern rule' trick.
# The syncconfig should be executed only once to make all the targets.
# (Note: use the grouped target '&:' when we bump to GNU Make 4.3)
-%/auto.conf %/auto.conf.cmd: $(KCONFIG_CONFIG)
+%/config/auto.conf %/config/auto.conf.cmd %/generated/autoconf.h: $(KCONFIG_CONFIG)
$(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
else # !may-sync-config
# External modules and some install targets need include/generated/autoconf.h
@@ -1148,7 +1148,8 @@ scripts: scripts_basic scripts_dtc
PHONY += prepare archprepare
archprepare: outputmakefile archheaders archscripts scripts include/config/kernel.release \
- asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h
+ asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h \
+ include/generated/autoconf.h
prepare0: archprepare
$(Q)$(MAKE) $(build)=scripts/mod