From: Masahiro Yamada Date: Fri, 13 Mar 2015 06:21:39 +0000 (+0900) Subject: kbuild: mergeconfig: move an error check to merge_config.sh X-Git-Tag: omap-for-v4.2/o2_dc~127^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9fe99c5b994c6ddc57780993966b18899526c0b;p=pandora-kernel.git kbuild: mergeconfig: move an error check to merge_config.sh Currently, "make tinyconfig" does not work with "-j" option. $ make mrproper $ make -j8 tinyconfig HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/zconf.lex.c SHIPPED scripts/kconfig/zconf.hash.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf scripts/kconfig/conf --allnoconfig Kconfig # # configuration written to .config # scripts/kconfig/Makefile:122: *** You need an existing .config for this target. Stop. make: *** [tinyconfig] Error 2 As shown above, "allnoconfig" has created the .config file before mergeconfig is called, but Make still raises a false alarm because of some sort of race condition. We can fix this issue by moving the error check to the shell script. Anyway, scripts/kconfig/merge_config.sh always requires an existing .config as a base file. It is reasonable to check its existence in the shell script. Signed-off-by: Masahiro Yamada Reviewed-by: Josh Triplett Reviewed-by: Darren Hart Signed-off-by: Michal Marek --- diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index fc34f46cb025..be0fad44ddd8 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -107,7 +107,6 @@ endif configfiles=$(wildcard $(srctree)/kernel/configs/$(1).config $(srctree)/arch/$(SRCARCH)/configs/$(1).config) define mergeconfig -$(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target)) $(if $(call configfiles,$(1)),, $(error No configuration exists for this target on this architecture)) $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(call configfiles,$(1)) +$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig Reading git-diff-tree failed