Skip to content

Commit a26fe28

Browse files
dkrucesmasahir0y
authored andcommitted
kconfig: merge_config: use an empty file as initfile
The scripts/kconfig/merge_config.sh script requires an existing $INITFILE (or the $1 argument) as a base file for merging Kconfig fragments. However, an empty $INITFILE can serve as an initial starting point, later referenced by the KCONFIG_ALLCONFIG Makefile variable if -m is not used. This variable can point to any configuration file containing preset config symbols (the merged output) as stated in Documentation/kbuild/kconfig.rst. When -m is used $INITFILE will contain just the merge output requiring the user to run make (i.e. KCONFIG_ALLCONFIG=<$INITFILE> make <allnoconfig/alldefconfig> or make olddefconfig). Instead of failing when `$INITFILE` is missing, create an empty file and use it as the starting point for merges. Signed-off-by: Daniel Gomez <da.gomez@samsung.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent 3b8241f commit a26fe28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/kconfig/merge_config.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ INITFILE=$1
112112
shift;
113113

114114
if [ ! -r "$INITFILE" ]; then
115-
echo "The base file '$INITFILE' does not exist. Exit." >&2
116-
exit 1
115+
echo "The base file '$INITFILE' does not exist. Creating one..." >&2
116+
touch "$INITFILE"
117117
fi
118118

119119
MERGE_LIST=$*

0 commit comments

Comments
 (0)