diff options
| author | Sam Ravnborg <sam@ravnborg.org> | 2018-05-22 15:36:12 -0400 |
|---|---|---|
| committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-05-28 05:25:21 -0400 |
| commit | 694c49a7c01cc87194be40cb26404b58b68c291c (patch) | |
| tree | 14380237215beb29d5a4e2f157bf28f1db80abdb /scripts | |
| parent | 1c5af5cf9308fff327f52c7efd2dfa732d370871 (diff) | |
kconfig: drop localization support
The localization support is broken and appears unused.
There is no google hits on the update-po-config target.
And there is no recent (5 years) activity related to the localization.
So lets just drop this as it is no longer used.
Suggested-by: Ulf Magnusson <ulfalizer@gmail.com>
Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/kconfig/.gitignore | 4 | ||||
| -rw-r--r-- | scripts/kconfig/Makefile | 42 | ||||
| -rw-r--r-- | scripts/kconfig/POTFILES.in | 12 | ||||
| -rwxr-xr-x | scripts/kconfig/check.sh | 14 | ||||
| -rw-r--r-- | scripts/kconfig/conf.c | 51 | ||||
| -rw-r--r-- | scripts/kconfig/confdata.c | 4 | ||||
| -rw-r--r-- | scripts/kconfig/gconf.c | 46 | ||||
| -rw-r--r-- | scripts/kconfig/kxgettext.c | 235 | ||||
| -rw-r--r-- | scripts/kconfig/lkc.h | 14 | ||||
| -rw-r--r-- | scripts/kconfig/lxdialog/checklist.c | 4 | ||||
| -rw-r--r-- | scripts/kconfig/lxdialog/dialog.h | 6 | ||||
| -rw-r--r-- | scripts/kconfig/lxdialog/inputbox.c | 4 | ||||
| -rw-r--r-- | scripts/kconfig/lxdialog/menubox.c | 10 | ||||
| -rw-r--r-- | scripts/kconfig/lxdialog/textbox.c | 2 | ||||
| -rw-r--r-- | scripts/kconfig/lxdialog/yesno.c | 4 | ||||
| -rw-r--r-- | scripts/kconfig/mconf.c | 141 | ||||
| -rw-r--r-- | scripts/kconfig/menu.c | 20 | ||||
| -rw-r--r-- | scripts/kconfig/nconf.c | 148 | ||||
| -rw-r--r-- | scripts/kconfig/nconf.h | 1 | ||||
| -rw-r--r-- | scripts/kconfig/qconf.cc | 104 | ||||
| -rw-r--r-- | scripts/kconfig/zconf.y | 2 |
21 files changed, 258 insertions, 610 deletions
diff --git a/scripts/kconfig/.gitignore b/scripts/kconfig/.gitignore index 2da579edcbaf..0aabc1d6a182 100644 --- a/scripts/kconfig/.gitignore +++ b/scripts/kconfig/.gitignore | |||
| @@ -2,9 +2,6 @@ | |||
| 2 | # Generated files | 2 | # Generated files |
| 3 | # | 3 | # |
| 4 | *.moc | 4 | *.moc |
| 5 | gconf.glade.h | ||
| 6 | *.pot | ||
| 7 | *.mo | ||
| 8 | 5 | ||
| 9 | # | 6 | # |
| 10 | # configuration programs | 7 | # configuration programs |
| @@ -14,4 +11,3 @@ mconf | |||
| 14 | nconf | 11 | nconf |
| 15 | qconf | 12 | qconf |
| 16 | gconf | 13 | gconf |
| 17 | kxgettext | ||
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index a71596c7ecfd..061e0eb62c28 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | # Kernel configuration targets | 3 | # Kernel configuration targets |
| 4 | # These targets are used from top-level makefile | 4 | # These targets are used from top-level makefile |
| 5 | 5 | ||
| 6 | PHONY += xconfig gconfig menuconfig config syncconfig update-po-config \ | 6 | PHONY += xconfig gconfig menuconfig config syncconfig \ |
| 7 | localmodconfig localyesconfig | 7 | localmodconfig localyesconfig |
| 8 | 8 | ||
| 9 | ifdef KBUILD_KCONFIG | 9 | ifdef KBUILD_KCONFIG |
| @@ -55,29 +55,6 @@ localyesconfig localmodconfig: $(obj)/conf | |||
| 55 | fi | 55 | fi |
| 56 | $(Q)rm -f .tmp.config | 56 | $(Q)rm -f .tmp.config |
| 57 | 57 | ||
| 58 | # Create new linux.pot file | ||
| 59 | # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files | ||
| 60 | update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h | ||
| 61 | $(Q)$(kecho) " GEN config.pot" | ||
| 62 | $(Q)xgettext --default-domain=linux \ | ||
| 63 | --add-comments --keyword=_ --keyword=N_ \ | ||
| 64 | --from-code=UTF-8 \ | ||
| 65 | --files-from=$(srctree)/scripts/kconfig/POTFILES.in \ | ||
| 66 | --directory=$(srctree) --directory=$(objtree) \ | ||
| 67 | --output $(obj)/config.pot | ||
| 68 | $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot | ||
| 69 | $(Q)(for i in `ls $(srctree)/arch/*/Kconfig \ | ||
| 70 | $(srctree)/arch/*/um/Kconfig`; \ | ||
| 71 | do \ | ||
| 72 | $(kecho) " GEN $$i"; \ | ||
| 73 | $(obj)/kxgettext $$i \ | ||
| 74 | >> $(obj)/config.pot; \ | ||
| 75 | done ) | ||
| 76 | $(Q)$(kecho) " GEN linux.pot" | ||
| 77 | $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ | ||
| 78 | --output $(obj)/linux.pot | ||
| 79 | $(Q)rm -f $(obj)/config.pot | ||
| 80 | |||
| 81 | # These targets map 1:1 to the commandline options of 'conf' | 58 | # These targets map 1:1 to the commandline options of 'conf' |
| 82 | simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \ | 59 | simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \ |
| 83 | alldefconfig randconfig listnewconfig olddefconfig | 60 | alldefconfig randconfig listnewconfig olddefconfig |
| @@ -179,19 +156,11 @@ help: | |||
| 179 | # object files used by all kconfig flavours | 156 | # object files used by all kconfig flavours |
| 180 | 157 | ||
| 181 | conf-objs := conf.o zconf.tab.o | 158 | conf-objs := conf.o zconf.tab.o |
| 182 | kxgettext-objs := kxgettext.o zconf.tab.o | ||
| 183 | 159 | ||
| 184 | hostprogs-y := conf kxgettext | 160 | hostprogs-y := conf |
| 185 | 161 | ||
| 186 | targets += zconf.lex.c | 162 | targets += zconf.lex.c |
| 187 | clean-files += gconf.glade.h | 163 | |
| 188 | clean-files += config.pot linux.pot | ||
| 189 | |||
| 190 | # Add environment specific flags | ||
| 191 | HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) \ | ||
| 192 | -DLOCALE | ||
| 193 | HOST_EXTRACXXFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCXX) $(HOSTCXXFLAGS)) \ | ||
| 194 | -DLOCALE | ||
| 195 | # generated files seem to need this to find local include files | 164 | # generated files seem to need this to find local include files |
| 196 | HOSTCFLAGS_zconf.lex.o := -I$(src) | 165 | HOSTCFLAGS_zconf.lex.o := -I$(src) |
| 197 | HOSTCFLAGS_zconf.tab.o := -I$(src) | 166 | HOSTCFLAGS_zconf.tab.o := -I$(src) |
| @@ -244,11 +213,6 @@ $(obj)/gconf.o: $(obj)/.gconf-cfg | |||
| 244 | 213 | ||
| 245 | $(obj)/zconf.tab.o: $(obj)/zconf.lex.c | 214 | $(obj)/zconf.tab.o: $(obj)/zconf.lex.c |
| 246 | 215 | ||
| 247 | # Extract gconf menu items for i18n support | ||
| 248 | $(obj)/gconf.glade.h: $(obj)/gconf.glade | ||
| 249 | $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \ | ||
| 250 | $(obj)/gconf.glade | ||
| 251 | |||
| 252 | # check if necessary packages are available, and configure build flags | 216 | # check if necessary packages are available, and configure build flags |
| 253 | define filechk_conf_cfg | 217 | define filechk_conf_cfg |
| 254 | $(CONFIG_SHELL) $< | 218 | $(CONFIG_SHELL) $< |
diff --git a/scripts/kconfig/POTFILES.in b/scripts/kconfig/POTFILES.in deleted file mode 100644 index 967457396990..000000000000 --- a/scripts/kconfig/POTFILES.in +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | scripts/kconfig/lxdialog/checklist.c | ||
| 2 | scripts/kconfig/lxdialog/inputbox.c | ||
| 3 | scripts/kconfig/lxdialog/menubox.c | ||
| 4 | scripts/kconfig/lxdialog/textbox.c | ||
| 5 | scripts/kconfig/lxdialog/util.c | ||
| 6 | scripts/kconfig/lxdialog/yesno.c | ||
| 7 | scripts/kconfig/mconf.c | ||
| 8 | scripts/kconfig/conf.c | ||
| 9 | scripts/kconfig/confdata.c | ||
| 10 | scripts/kconfig/gconf.c | ||
| 11 | scripts/kconfig/gconf.glade.h | ||
| 12 | scripts/kconfig/qconf.cc | ||
diff --git a/scripts/kconfig/check.sh b/scripts/kconfig/check.sh deleted file mode 100755 index 97f0fee7d173..000000000000 --- a/scripts/kconfig/check.sh +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # SPDX-License-Identifier: GPL-2.0 | ||
| 3 | # Needed for systems without gettext | ||
| 4 | $* -x c -o /dev/null - > /dev/null 2>&1 << EOF | ||
| 5 | #include <libintl.h> | ||
| 6 | int main() | ||
| 7 | { | ||
| 8 | gettext(""); | ||
| 9 | return 0; | ||
| 10 | } | ||
| 11 | EOF | ||
| 12 | if [ ! "$?" -eq "0" ]; then | ||
| 13 | echo -DKBUILD_NO_NLS; | ||
| 14 | fi | ||
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 283eeedaa4fa..671ff5364497 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
| @@ -3,7 +3,6 @@ | |||
| 3 | * Released under the terms of the GNU GPL v2.0. | 3 | * Released under the terms of the GNU GPL v2.0. |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | #include <locale.h> | ||
| 7 | #include <ctype.h> | 6 | #include <ctype.h> |
| 8 | #include <limits.h> | 7 | #include <limits.h> |
| 9 | #include <stdio.h> | 8 | #include <stdio.h> |
| @@ -86,7 +85,7 @@ static int conf_askvalue(struct symbol *sym, const char *def) | |||
| 86 | enum symbol_type type = sym_get_type(sym); | 85 | enum symbol_type type = sym_get_type(sym); |
| 87 | 86 | ||
| 88 | if (!sym_has_value(sym)) | 87 | if (!sym_has_value(sym)) |
| 89 | printf(_("(NEW) ")); | 88 | printf("(NEW) "); |
| 90 | 89 | ||
| 91 | line[0] = '\n'; | 90 | line[0] = '\n'; |
| 92 | line[1] = 0; | 91 | line[1] = 0; |
| @@ -133,7 +132,7 @@ static int conf_string(struct menu *menu) | |||
| 133 | const char *def; | 132 | const char *def; |
| 134 | 133 | ||
| 135 | while (1) { | 134 | while (1) { |
| 136 | printf("%*s%s ", indent - 1, "", _(menu->prompt->text)); | 135 | printf("%*s%s ", indent - 1, "", menu->prompt->text); |
| 137 | printf("(%s) ", sym->name); | 136 | printf("(%s) ", sym->name); |
| 138 | def = sym_get_string_value(sym); | 137 | def = sym_get_string_value(sym); |
| 139 | if (sym_get_string_value(sym)) | 138 | if (sym_get_string_value(sym)) |
| @@ -166,7 +165,7 @@ static int conf_sym(struct menu *menu) | |||
| 166 | tristate oldval, newval; | 165 | tristate oldval, newval; |
| 167 | 166 | ||
| 168 | while (1) { | 167 | while (1) { |
| 169 | printf("%*s%s ", indent - 1, "", _(menu->prompt->text)); | 168 | printf("%*s%s ", indent - 1, "", menu->prompt->text); |
| 170 | if (sym->name) | 169 | if (sym->name) |
| 171 | printf("(%s) ", sym->name); | ||
