You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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 <yamada.masahiro@socionext.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
committed by
Michal Marek
parent
de46199372
commit
b9fe99c5b9
@@ -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
|
||||
|
||||
@@ -85,6 +85,11 @@ fi
|
||||
INITFILE=$1
|
||||
shift;
|
||||
|
||||
if [ ! -r "$INITFILE" ]; then
|
||||
echo "The base file '$INITFILE' does not exist. Exit." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MERGE_LIST=$*
|
||||
SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p"
|
||||
TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
|
||||
|
||||
Reference in New Issue
Block a user