Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da85d342 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull kconfig changes from Michal Marek:

 - Error handling for make KCONFIG_ALLCONFIG=<...> all*config plus a fix
   for a bug that was exposed by this

 - Fix for the script/config utility.

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  scripts/config: properly report and set string options
  kbuild: all{no,yes,mod,def,rand}config only read files when instructed to.
  kconfig: Add error handling to KCONFIG_ALLCONFIG
parents 1347a2ce d6686da8
Loading
Loading
Loading
Loading
+9 −9
Original line number Original line Diff line number Diff line
@@ -53,15 +53,15 @@ KCONFIG_ALLCONFIG
--------------------------------------------------
--------------------------------------------------
(partially based on lkml email from/by Rob Landley, re: miniconfig)
(partially based on lkml email from/by Rob Landley, re: miniconfig)
--------------------------------------------------
--------------------------------------------------
The allyesconfig/allmodconfig/allnoconfig/randconfig variants can
The allyesconfig/allmodconfig/allnoconfig/randconfig variants can also
also use the environment variable KCONFIG_ALLCONFIG as a flag or a
use the environment variable KCONFIG_ALLCONFIG as a flag or a filename
filename that contains config symbols that the user requires to be
that contains config symbols that the user requires to be set to a
set to a specific value.  If KCONFIG_ALLCONFIG is used without a
specific value.  If KCONFIG_ALLCONFIG is used without a filename where
filename, "make *config" checks for a file named
KCONFIG_ALLCONFIG == "" or KCONFIG_ALLCONFIG == "1", "make *config"
"all{yes/mod/no/def/random}.config" (corresponding to the *config command
checks for a file named "all{yes/mod/no/def/random}.config"
that was used) for symbol values that are to be forced.  If this file
(corresponding to the *config command that was used) for symbol values
is not found, it checks for a file named "all.config" to contain forced
that are to be forced.  If this file is not found, it checks for a
values.
file named "all.config" to contain forced values.


This enables you to create "miniature" config (miniconfig) or custom
This enables you to create "miniature" config (miniconfig) or custom
config files containing just the config symbols that you are interested
config files containing just the config symbols that you are interested
+7 −4
Original line number Original line Diff line number Diff line
@@ -107,7 +107,8 @@ while [ "$1" != "" ] ; do
		;;
		;;


	--set-str)
	--set-str)
		set_var "CONFIG_$ARG" "CONFIG_$ARG=\"$1\""
		# sed swallows one level of escaping, so we need double-escaping
		set_var "CONFIG_$ARG" "CONFIG_$ARG=\"${1//\"/\\\\\"}\""
		shift
		shift
		;;
		;;


@@ -124,9 +125,11 @@ while [ "$1" != "" ] ; do
			if [ $? != 0 ] ; then
			if [ $? != 0 ] ; then
				echo undef
				echo undef
			else
			else
				V="${V/CONFIG_$ARG=/}"
				V="${V/#CONFIG_$ARG=/}"
				V="${V/\"/}"
				V="${V/#\"/}"
				echo "$V"
				V="${V/%\"/}"
				V="${V/\\\"/\"}"
				echo "${V}"
			fi
			fi
		fi
		fi
		;;
		;;
+16 −6
Original line number Original line Diff line number Diff line
@@ -574,8 +574,15 @@ int main(int ac, char **av)
	case alldefconfig:
	case alldefconfig:
	case randconfig:
	case randconfig:
		name = getenv("KCONFIG_ALLCONFIG");
		name = getenv("KCONFIG_ALLCONFIG");
		if (name && !stat(name, &tmpstat)) {
		if (!name)
			conf_read_simple(name, S_DEF_USER);
			break;
		if ((strcmp(name, "") != 0) && (strcmp(name, "1") != 0)) {
			if (conf_read_simple(name, S_DEF_USER)) {
				fprintf(stderr,
					_("*** Can't read seed configuration \"%s\"!\n"),
					name);
				exit(1);
			}
			break;
			break;
		}
		}
		switch (input_mode) {
		switch (input_mode) {
@@ -586,10 +593,13 @@ int main(int ac, char **av)
		case randconfig:	name = "allrandom.config"; break;
		case randconfig:	name = "allrandom.config"; break;
		default: break;
		default: break;
		}
		}
		if (!stat(name, &tmpstat))
		if (conf_read_simple(name, S_DEF_USER) &&
			conf_read_simple(name, S_DEF_USER);
		    conf_read_simple("all.config", S_DEF_USER)) {
		else if (!stat("all.config", &tmpstat))
			fprintf(stderr,
			conf_read_simple("all.config", S_DEF_USER);
				_("*** KCONFIG_ALLCONFIG set, but no \"%s\" or \"all.config\" file found\n"),
				name);
			exit(1);
		}
		break;
		break;
	default:
	default:
		break;
		break;