From f5ef2f7bf2e389f5c94d69e09268356f4c2b8220 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Fri, 8 Jun 2012 01:48:56 +0200 Subject: scripts/config: allow alternate prefix to config option symbol While the Linux kernel uses 'CONFIG_' as a prefix to the config options symbols, many projects that use kconfig may use different prefixes, or even none at all. If the CONFIG_ environment variable is set, use it as the prefix (empty is a valid prefix). Otherwise, use the default prefix 'CONFIG_'. This matches the support for alternate prefixes in scripts/kconfig/lkc.h, which uses the same logic (albeit with a C define instead of an environment variable). Signed-off-by: "Yann E. MORIN" Signed-off-by: Michal Marek --- scripts/config | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'scripts') diff --git a/scripts/config b/scripts/config index c5639fe5bba..9723c7de07c 100755 --- a/scripts/config +++ b/scripts/config @@ -1,6 +1,9 @@ #!/bin/bash # Manipulate options in a .config file from the command line +# If no prefix forced, use the default CONFIG_ +CONFIG_="${CONFIG_-CONFIG_}" + usage() { cat >&2 <