Commit 911a91c3 authored by Masahiro Yamada's avatar Masahiro Yamada

kconfig: rename silentoldconfig to syncconfig

As commit cedd55d4 ("kconfig: Remove silentoldconfig from help
and docs; fix kconfig/conf's help") mentioned, 'silentoldconfig' is a
historical misnomer.  That commit removed it from help and docs since
it is an internal interface.  If so, it should be allowed to rename
it to something more intuitive.  'syncconfig' is the one I came up
with because it updates the .config if necessary, then synchronize
include/generated/autoconf.h and include/config/* with it.

You should not manually invoke 'silentoldcofig'.  Display warning if
used in case existing scripts are doing wrong.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: default avatarUlf Magnusson <ulfalizer@gmail.com>
parent 81d2bc22
...@@ -119,7 +119,7 @@ Examples: ...@@ -119,7 +119,7 @@ Examples:
15% of tristates will be set to 'y', 15% to 'm', 70% to 'n' 15% of tristates will be set to 'y', 15% to 'm', 70% to 'n'
______________________________________________________________________ ______________________________________________________________________
Environment variables for 'silentoldconfig' Environment variables for 'syncconfig'
KCONFIG_NOSILENTUPDATE KCONFIG_NOSILENTUPDATE
-------------------------------------------------- --------------------------------------------------
......
...@@ -32,7 +32,7 @@ Enabling the driver ...@@ -32,7 +32,7 @@ Enabling the driver
The driver is enabled via the standard kernel configuration system, The driver is enabled via the standard kernel configuration system,
using the make command: using the make command:
Make oldconfig/silentoldconfig/menuconfig/etc. make config/oldconfig/menuconfig/etc.
The driver is located in the menu structure at: The driver is located in the menu structure at:
......
...@@ -588,7 +588,7 @@ $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ; ...@@ -588,7 +588,7 @@ $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
# include/generated/ and include/config/. Update them if .config is newer than # include/generated/ and include/config/. Update them if .config is newer than
# include/config/auto.conf (which mirrors .config). # include/config/auto.conf (which mirrors .config).
include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig $(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
else else
# external modules needs include/generated/autoconf.h and include/config/auto.conf # external modules needs include/generated/autoconf.h and include/config/auto.conf
# but do not care if they are up-to-date. Use auto.conf to trigger the test # but do not care if they are up-to-date. Use auto.conf to trigger the test
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Kernel configuration targets # Kernel configuration targets
# These targets are used from top-level makefile # These targets are used from top-level makefile
PHONY += xconfig gconfig menuconfig config silentoldconfig update-po-config \ PHONY += xconfig gconfig menuconfig config syncconfig update-po-config \
localmodconfig localyesconfig localmodconfig localyesconfig
ifdef KBUILD_KCONFIG ifdef KBUILD_KCONFIG
...@@ -36,7 +36,7 @@ nconfig: $(obj)/nconf ...@@ -36,7 +36,7 @@ nconfig: $(obj)/nconf
# This has become an internal implementation detail and is now deprecated # This has become an internal implementation detail and is now deprecated
# for external use. # for external use.
silentoldconfig: $(obj)/conf syncconfig: $(obj)/conf
$(Q)mkdir -p include/config include/generated $(Q)mkdir -p include/config include/generated
$(Q)test -e include/generated/autoksyms.h || \ $(Q)test -e include/generated/autoksyms.h || \
touch include/generated/autoksyms.h touch include/generated/autoksyms.h
...@@ -88,7 +88,7 @@ PHONY += $(simple-targets) ...@@ -88,7 +88,7 @@ PHONY += $(simple-targets)
$(simple-targets): $(obj)/conf $(simple-targets): $(obj)/conf
$< $(silent) --$@ $(Kconfig) $< $(silent) --$@ $(Kconfig)
PHONY += oldnoconfig savedefconfig defconfig PHONY += oldnoconfig silentoldconfig savedefconfig defconfig
# oldnoconfig is an alias of olddefconfig, because people already are dependent # oldnoconfig is an alias of olddefconfig, because people already are dependent
# on its behavior (sets new symbols to their default value but not 'n') with the # on its behavior (sets new symbols to their default value but not 'n') with the
...@@ -97,6 +97,13 @@ oldnoconfig: olddefconfig ...@@ -97,6 +97,13 @@ oldnoconfig: olddefconfig
@echo " WARNING: \"oldnoconfig\" target will be removed after Linux 4.19" @echo " WARNING: \"oldnoconfig\" target will be removed after Linux 4.19"
@echo " Please use \"olddefconfig\" instead, which is an alias." @echo " Please use \"olddefconfig\" instead, which is an alias."
# We do not expect manual invokcation of "silentoldcofig" (or "syncconfig").
silentoldconfig: syncconfig
@echo " WARNING: \"silentoldconfig\" has been renamed to \"syncconfig\""
@echo " and is now an internal implementation detail."
@echo " What you want is probably \"oldconfig\"."
@echo " \"silentoldconfig\" will be removed after Linux 4.19"
savedefconfig: $(obj)/conf savedefconfig: $(obj)/conf
$< $(silent) --$@=defconfig $(Kconfig) $< $(silent) --$@=defconfig $(Kconfig)
......
...@@ -23,7 +23,7 @@ static void check_conf(struct menu *menu); ...@@ -23,7 +23,7 @@ static void check_conf(struct menu *menu);
enum input_mode { enum input_mode {
oldaskconfig, oldaskconfig,
silentoldconfig, syncconfig,
oldconfig, oldconfig,
allnoconfig, allnoconfig,
allyesconfig, allyesconfig,
...@@ -100,7 +100,7 @@ static int conf_askvalue(struct symbol *sym, const char *def) ...@@ -100,7 +100,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
switch (input_mode) { switch (input_mode) {
case oldconfig: case oldconfig:
case silentoldconfig: case syncconfig:
if (sym_has_value(sym)) { if (sym_has_value(sym)) {
printf("%s\n", def); printf("%s\n", def);
return 0; return 0;
...@@ -293,7 +293,7 @@ static int conf_choice(struct menu *menu) ...@@ -293,7 +293,7 @@ static int conf_choice(struct menu *menu)
printf("[1-%d?]: ", cnt); printf("[1-%d?]: ", cnt);
switch (input_mode) { switch (input_mode) {
case oldconfig: case oldconfig:
case silentoldconfig: case syncconfig:
if (!is_new) { if (!is_new) {
cnt = def; cnt = def;
printf("%d\n", cnt); printf("%d\n", cnt);
...@@ -441,7 +441,7 @@ static void check_conf(struct menu *menu) ...@@ -441,7 +441,7 @@ static void check_conf(struct menu *menu)
static struct option long_opts[] = { static struct option long_opts[] = {
{"oldaskconfig", no_argument, NULL, oldaskconfig}, {"oldaskconfig", no_argument, NULL, oldaskconfig},
{"oldconfig", no_argument, NULL, oldconfig}, {"oldconfig", no_argument, NULL, oldconfig},
{"silentoldconfig", no_argument, NULL, silentoldconfig}, {"syncconfig", no_argument, NULL, syncconfig},
{"defconfig", optional_argument, NULL, defconfig}, {"defconfig", optional_argument, NULL, defconfig},
{"savedefconfig", required_argument, NULL, savedefconfig}, {"savedefconfig", required_argument, NULL, savedefconfig},
{"allnoconfig", no_argument, NULL, allnoconfig}, {"allnoconfig", no_argument, NULL, allnoconfig},
...@@ -468,8 +468,8 @@ static void conf_usage(const char *progname) ...@@ -468,8 +468,8 @@ static void conf_usage(const char *progname)
printf(" --listnewconfig List new options\n"); printf(" --listnewconfig List new options\n");
printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); printf(" --oldaskconfig Start a new configuration using a line-oriented program\n");
printf(" --oldconfig Update a configuration using a provided .config as base\n"); printf(" --oldconfig Update a configuration using a provided .config as base\n");
printf(" --silentoldconfig Similar to oldconfig but generates configuration in\n" printf(" --syncconfig Similar to oldconfig but generates configuration in\n"
" include/{generated/,config/} (oldconfig used to be more verbose)\n"); " include/{generated/,config/}\n");
printf(" --olddefconfig Same as oldconfig but sets new symbols to their default value\n"); printf(" --olddefconfig Same as oldconfig but sets new symbols to their default value\n");
printf(" --oldnoconfig An alias of olddefconfig\n"); printf(" --oldnoconfig An alias of olddefconfig\n");
printf(" --defconfig <file> New config with default defined in <file>\n"); printf(" --defconfig <file> New config with default defined in <file>\n");
...@@ -501,7 +501,7 @@ int main(int ac, char **av) ...@@ -501,7 +501,7 @@ int main(int ac, char **av)
} }
input_mode = (enum input_mode)opt; input_mode = (enum input_mode)opt;
switch (opt) { switch (opt) {
case silentoldconfig: case syncconfig:
sync_kconfig = 1; sync_kconfig = 1;
break; break;
case defconfig: case defconfig:
...@@ -583,7 +583,7 @@ int main(int ac, char **av) ...@@ -583,7 +583,7 @@ int main(int ac, char **av)
} }
break; break;
case savedefconfig: case savedefconfig:
case silentoldconfig: case syncconfig:
case oldaskconfig: case oldaskconfig:
case oldconfig: case oldconfig:
case listnewconfig: case listnewconfig:
...@@ -667,7 +667,7 @@ int main(int ac, char **av) ...@@ -667,7 +667,7 @@ int main(int ac, char **av)
/* fall through */ /* fall through */
case oldconfig: case oldconfig:
case listnewconfig: case listnewconfig:
case silentoldconfig: case syncconfig:
/* Update until a loop caused no more changes */ /* Update until a loop caused no more changes */
do { do {
conf_cnt = 0; conf_cnt = 0;
...@@ -680,7 +680,7 @@ int main(int ac, char **av) ...@@ -680,7 +680,7 @@ int main(int ac, char **av)
} }
if (sync_kconfig) { if (sync_kconfig) {
/* silentoldconfig is used during the build so we shall update autoconf. /* syncconfig is used during the build so we shall update autoconf.
* All other commands are only used to generate a config. * All other commands are only used to generate a config.
*/ */
if (conf_get_changed() && conf_write(NULL)) { if (conf_get_changed() && conf_write(NULL)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment