summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorPetr Vorel <petr.vorel@gmail.com>2018-10-29 22:10:58 +0100
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-11-02 00:15:26 +0900
commit2cd3faf87d2d8f6123adf34741b9a7b98828a76f (patch)
tree2530099708bd0e32e10991a83dcf31f3c1d85c05 /scripts/kconfig
parent3f80babd9ca477d19a027e0b25b95973cd7f7357 (diff)
downloadlinux-2cd3faf87d2d8f6123adf34741b9a7b98828a76f.tar.gz
linux-2cd3faf87d2d8f6123adf34741b9a7b98828a76f.tar.bz2
linux-2cd3faf87d2d8f6123adf34741b9a7b98828a76f.zip
merge_config.sh: Allow to define config prefix
with CONFIG_ environment variable. merge_config.sh uses CONFIG_ which is used in kernel and other projects. There are some projects which use kconfig with different prefixes (e.g. buildroot: BR2_ prefix). CONFIG_ variable is already used for this purpose in kconfig binary (scripts/kconfig/lkc.h), let's use the same rule for in merge_config.sh. Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Petr Vorel <petr.vorel@gmail.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/kconfig')
-rwxr-xr-xscripts/kconfig/merge_config.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 67d131447631..da66e7742282 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -33,12 +33,15 @@ usage() {
echo " -n use allnoconfig instead of alldefconfig"
echo " -r list redundant entries when merging fragments"
echo " -O dir to put generated output files. Consider setting \$KCONFIG_CONFIG instead."
+ echo
+ echo "Used prefix: '$CONFIG_PREFIX'. You can redefine it with \$CONFIG_ environment variable."
}
RUNMAKE=true
ALLTARGET=alldefconfig
WARNREDUN=false
OUTPUT=.
+CONFIG_PREFIX=${CONFIG_-CONFIG_}
while true; do
case $1 in
@@ -99,7 +102,8 @@ if [ ! -r "$INITFILE" ]; then
fi
MERGE_LIST=$*
-SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p"
+SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(${CONFIG_PREFIX}[a-zA-Z0-9_]*\)[= ].*/\2/p"
+
TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
echo "Using $INITFILE as base"