summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-06-10 17:47:04 +0900
committerSascha Hauer <s.hauer@pengutronix.de>2019-06-19 09:20:49 +0200
commit163be86a3212867c8493fdabd0e1d431adfece92 (patch)
treebc7e29d4e04753519b6614a9c6a9f0af62a64dcf /Makefile
parent71948298b2bd8860f99fb0b4f7efbae463ea7d9f (diff)
downloadbarebox-163be86a3212867c8493fdabd0e1d431adfece92.tar.gz
barebox-163be86a3212867c8493fdabd0e1d431adfece92.tar.xz
kconfig: update to Linux 5.2-rc4
The previous sync was Linux 4.20. This updates Kconfig to Linux 5.2-rc4. I adjusted the top Makefile as well because Linux commit 058507195b53 ("kbuild: move ".config not found!" message from Kconfig to Makefile") moved the .config check from Kconfig to Makefile. I also made auto.conf a mandatory include file, and remove it from the prerequisites of other targets. We are safe because Make is immediately terminated when syncconfig fails to generate auto.conf. Highlights: - The parser has no more shift/reduce conflicts - The lexer was rewritten more simply - The token lookup table was deleted - Replace license boilerplates with SPDX - Compile C files as separate units - Do not overwrite .config when the content was not changed - Lots of bug-fixes and cleanups Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 24 insertions, 17 deletions
diff --git a/Makefile b/Makefile
index 8265e5f3e8..f5df87f4cb 100644
--- a/Makefile
+++ b/Makefile
@@ -428,31 +428,37 @@ else
# Carefully list dependencies so we do not try to build scripts twice
# in parallel
PHONY += scripts
-scripts: scripts_basic include/config/auto.conf
+scripts: scripts_basic
$(Q)$(MAKE) $(build)=$(@)
# Objects we will link into barebox / subdirs we need to visit
common-y := common/ drivers/ commands/ lib/ crypto/ net/ fs/ firmware/
ifeq ($(dot-config),1)
-# Read in config
--include include/config/auto.conf
-
-# Read in dependencies to all Kconfig* files, make sure to run
-# oldconfig if changes are detected.
--include include/config/auto.conf.cmd
-
-# To avoid any implicit rule to kick in, define an empty command
-$(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
+include include/config/auto.conf
+
+# Read in dependencies to all Kconfig* files, make sure to run syncconfig if
+# changes are detected. This should be included after arch/$(SRCARCH)/Makefile
+# because some architectures define CROSS_COMPILE there.
+include include/config/auto.conf.cmd
+
+$(KCONFIG_CONFIG):
+ @echo >&2 '***'
+ @echo >&2 '*** Configuration file "$@" not found!'
+ @echo >&2 '***'
+ @echo >&2 '*** Please run some configurator (e.g. "make oldconfig" or'
+ @echo >&2 '*** "make menuconfig" or "make xconfig").'
+ @echo >&2 '***'
+ @/bin/false
# The actual configuration files used during the build are stored in
# include/generated/ and include/config/. Update them if .config is newer than
# include/config/auto.conf (which mirrors .config).
-include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
+#
+# This exploits the 'multi-target pattern rule' trick.
+# The syncconfig should be executed only once to make all the targets.
+%/auto.conf %/auto.conf.cmd %/tristate.conf: $(KCONFIG_CONFIG)
$(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
-else
-# Dummy target needed, because used as prerequisite
-include/config/auto.conf: ;
endif # $(dot-config)
include $(srctree)/arch/$(ARCH)/Makefile
@@ -788,7 +794,7 @@ $(barebox-dirs): prepare scripts
# Store (new) KERNELRELASE string in include/config/kernel.release
localversion = $(shell $(srctree)/scripts/setlocalversion $(srctree))
-include/config/kernel.release: include/config/auto.conf FORCE
+include/config/kernel.release: FORCE
$(Q)rm -f $@
$(Q)echo $(KERNELVERSION)$(localversion) > $@
@@ -821,7 +827,7 @@ endif
prepare2: prepare3 outputmakefile
prepare1: prepare2 include/generated/version.h include/generated/utsrelease.h \
- include/config.h include/config/auto.conf
+ include/config.h
ifneq ($(KBUILD_MODULES),)
$(Q)mkdir -p $(MODVERDIR)
@@ -852,7 +858,8 @@ define symlink-config-h
fi
endef
-include/config.h: include/config/auto.conf
+PHONY += include/config.h
+include/config.h:
$(Q)$(symlink-config-h)
# Generate some files