diff options
author | Alexey Neyman <stilor@att.net> | 2019-01-27 19:04:15 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2019-01-27 22:55:26 -0800 |
commit | adc16046f769fdf27db9b533260609fe675d8c6b (patch) | |
tree | 5b9b1727f256c7c07d7c517daf769b002f4a6bc8 /config/global.in | |
parent | 20c6accc65b9dafbb3e764b36e162c919b3b728c (diff) | |
download | crosstool-ng-adc16046f769fdf27db9b533260609fe675d8c6b.tar.gz crosstool-ng-adc16046f769fdf27db9b533260609fe675d8c6b.tar.bz2 crosstool-ng-adc16046f769fdf27db9b533260609fe675d8c6b.zip |
Add upgrade logic to version-check.sh
Slightly rework config version detector to catch the case where neither
CONFIG_VERSION/CONFIG_VERSION_CURRENT is defined in the config file.
Add olddefconfig and use it after the upgrade.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'config/global.in')
-rw-r--r-- | config/global.in | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/config/global.in b/config/global.in index a19667b7..f5df002d 100644 --- a/config/global.in +++ b/config/global.in @@ -18,15 +18,24 @@ config VCHECK string option env="CT_VCHECK" +# Kconfig's idiosynchrasy: it does not output the config settings declared with 'option env' +# to the generated .config file. Must use one extra level of indirection. +config CONFIG_VERSION_ENV + string + option env="CT_CONFIG_VERSION_CURRENT" + +# Up-to-date version of the configuration file. If saving a defconfig, choose a default that +# is guaranteed not to match - so that kconfig saves the value to .config. config CONFIG_VERSION_CURRENT string - default -1 if VCHECK = "save" - default 1 + default CONFIG_VERSION_ENV +# Version used by the config being loaded (e.g. as part of 'oldconfig' or recalling +# a defconfig. Make it changeable while loading/saving to force writing it to defconfig. config CONFIG_VERSION string prompt "** make it changeable **" if VCHECK = "load" || VCHECK = "save" - default 0 if VCHECK = "load" || VCHECK = "save" + default "0" if VCHECK = "load" || VCHECK = "save" default CONFIG_VERSION_CURRENT if VCHECK = "warning" |