From 06a1b794073c4d6adbfb2e4b11339985a14d7a00 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Mon, 14 Jun 2021 11:09:56 +0530 Subject: Reinstate gconv-modules as the default configuration file Reinstate gconv-modules as the main file so that the configuration files in gconv-modules.d/ become add-on configuration. With this, the effective user visible change is that GCONV_PATH can now have supplementary configuration in GCONV_PATH/gconv-modules.d/ in addition to the main GCONV_PATH/gconv-modules file. --- iconvdata/Makefile | 40 ++++++++------- iconvdata/gconv-modules | 115 +++++++++++++++++++++++++++++++++++++++++++ iconvdata/gconv-modules.conf | 115 ------------------------------------------- localedata/Makefile | 4 +- 4 files changed, 138 insertions(+), 136 deletions(-) create mode 100644 iconvdata/gconv-modules delete mode 100644 iconvdata/gconv-modules.conf diff --git a/iconvdata/Makefile b/iconvdata/Makefile index 3c6929f..bb3f621 100644 --- a/iconvdata/Makefile +++ b/iconvdata/Makefile @@ -137,13 +137,12 @@ charmaps = ../localedata/charmaps extra-modules-left := $(modules) include extra-module.mk -gconv-modules = gconv-modules.conf gconv-modules-extra.conf +gconv-modules = gconv-modules gconv-modules.d/gconv-modules-extra.conf modpfx = $(objpfx)gconv-modules.d/ extra-objs += $(modules.so) install-others = $(addprefix $(inst_gconvdir)/, $(modules.so)) \ - $(addprefix $(inst_gconvdir)/gconv-modules.d/, \ - $(gconv-modules)) + $(addprefix $(inst_gconvdir)/, $(gconv-modules)) # We can build the conversion tables for numerous charsets automatically. @@ -185,7 +184,7 @@ generated += $(generated-modules:=.h) $(generated-modules:=.stmp) \ iconv-test.out iconv-rules tst-loading.mtrace \ mtrace-tst-loading.out tst-tables.out iconv-test.xxx ifdef objpfx -generated += $(addprefix gconv-modules.d/,$(gconv-modules)) +generated += $(gconv-modules) endif # Rules to generate the headers. @@ -253,8 +252,8 @@ headers: $(addprefix $(objpfx), $(generated-modules:=.h)) $(addprefix $(inst_gconvdir)/, $(modules.so)): \ $(inst_gconvdir)/%: $(objpfx)% $(+force) $(do-install-program) -$(addprefix $(inst_gconvdir)/gconv-modules.d/, $(gconv-modules)): \ - $(inst_gconvdir)/gconv-modules.d/%: $(modpfx)% $(+force) +$(addprefix $(inst_gconvdir)/, $(gconv-modules)): \ + $(inst_gconvdir)/%: $(objpfx)% $(+force) $(do-install) ifeq (no,$(cross-compiling)) # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary @@ -307,29 +306,29 @@ $(objpfx)mtrace-tst-loading.out: $(objpfx)tst-loading.out $(common-objpfx)malloc/mtrace $(objpfx)tst-loading.mtrace > $@; \ $(evaluate-test) -$(objpfx)bug-iconv1.out: $(addprefix $(modpfx), $(gconv-modules)) \ +$(objpfx)bug-iconv1.out: $(addprefix $(objpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)bug-iconv2.out: $(addprefix $(modpfx), $(gconv-modules)) \ +$(objpfx)bug-iconv2.out: $(addprefix $(objpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)bug-iconv3.out: $(addprefix $(modpfx), $(gconv-modules)) \ +$(objpfx)bug-iconv3.out: $(addprefix $(objpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)bug-iconv5.out: $(addprefix $(modpfx), $(gconv-modules)) \ +$(objpfx)bug-iconv5.out: $(addprefix $(objpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)tst-loading.out: $(addprefix $(modpfx), $(gconv-modules)) \ +$(objpfx)tst-loading.out: $(addprefix $(objpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)tst-iconv4.out: $(addprefix $(modpfx), $(gconv-modules)) \ +$(objpfx)tst-iconv4.out: $(addprefix $(objpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)tst-iconv7.out: $(addprefix $(modpfx), $(gconv-modules)) \ +$(objpfx)tst-iconv7.out: $(addprefix $(objpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)bug-iconv10.out: $(addprefix $(modpfx), $(gconv-modules)) \ +$(objpfx)bug-iconv10.out: $(addprefix $(objpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)bug-iconv12.out: $(addprefix $(modpfx), $(gconv-modules)) \ +$(objpfx)bug-iconv12.out: $(addprefix $(objpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)bug-iconv14.out: $(addprefix $(modpfx), $(gconv-modules)) \ +$(objpfx)bug-iconv14.out: $(addprefix $(objpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) $(objpfx)iconv-test.out: run-iconv-test.sh \ - $(addprefix $(modpfx), $(gconv-modules)) \ + $(addprefix $(objpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) \ $(common-objdir)/iconv/iconv_prog TESTS iconv_modules="$(modules)" \ @@ -338,7 +337,7 @@ $(objpfx)iconv-test.out: run-iconv-test.sh \ $(evaluate-test) $(objpfx)tst-tables.out: tst-tables.sh \ - $(addprefix $(modpfx), $(gconv-modules)) \ + $(addprefix $(objpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) \ $(objpfx)tst-table-from $(objpfx)tst-table-to $(SHELL) $< $(common-objpfx) $(common-objpfx)iconvdata/ \ @@ -357,7 +356,10 @@ $(modpfx): $(modpfx)%: % $(modpfx) cp $< $@ +$(objpfx)gconv-modules: gconv-modules + cp $^ $@ + # Test requires BIG5HKSCS. $(objpfx)tst-iconv-big5-hkscs-to-2ucs4.out: \ - $(addprefix $(modpfx), $(gconv-modules)) \ + $(addprefix $(objpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) diff --git a/iconvdata/gconv-modules b/iconvdata/gconv-modules new file mode 100644 index 0000000..4acbba0 --- /dev/null +++ b/iconvdata/gconv-modules @@ -0,0 +1,115 @@ +# GNU libc iconv configuration. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# This file is part of the GNU C Library. + +# The GNU C Library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. + +# The GNU C Library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. + +# You should have received a copy of the GNU Lesser General Public +# License along with the GNU C Library; if not, see +# . + +# All lines contain the following information: + +# If the lines start with `module' +# fromset: either a name triple or a regular expression triple. +# toset: a name triple or an expression with \N to get regular +# expression matching results. +# filename: filename of the module implementing the transformation. +# If it is not absolute the path is made absolute by prepending +# the directory the configuration file is found in. +# cost: optional cost of the transformation. Default is 1. + +# If the lines start with `alias' +# alias: alias name which is not really recognized. +# name: the real name of the character set + +# from to module cost +alias ISO-IR-100// ISO-8859-1// +alias ISO_8859-1:1987// ISO-8859-1// +alias ISO_8859-1// ISO-8859-1// +alias ISO8859-1// ISO-8859-1// +alias ISO88591// ISO-8859-1// +alias LATIN1// ISO-8859-1// +alias L1// ISO-8859-1// +alias IBM819// ISO-8859-1// +alias CP819// ISO-8859-1// +alias CSISOLATIN1// ISO-8859-1// +alias 8859_1// ISO-8859-1// +alias OSF00010001// ISO-8859-1// +module ISO-8859-1// INTERNAL ISO8859-1 1 +module INTERNAL ISO-8859-1// ISO8859-1 1 + +# from to module cost +alias ISO8859-15// ISO-8859-15// +alias ISO885915// ISO-8859-15// +alias ISO-IR-203// ISO-8859-15// +alias ISO_8859-15// ISO-8859-15// +alias LATIN-9// ISO-8859-15// +alias LATIN9// ISO-8859-15// +alias ISO_8859-15:1998// ISO-8859-15// +module ISO-8859-15// INTERNAL ISO8859-15 1 +module INTERNAL ISO-8859-15// ISO8859-15 1 + +# from to module cost +alias MS-ANSI// CP1252// +alias WINDOWS-1252// CP1252// +module CP1252// INTERNAL CP1252 1 +module INTERNAL CP1252// CP1252 1 + +# from to module cost +alias ANSI_X3.110-1983// ANSI_X3.110// +alias ISO-IR-99// ANSI_X3.110// +alias CSA_T500-1983// ANSI_X3.110// +alias CSA_T500// ANSI_X3.110// +alias NAPLPS// ANSI_X3.110// +alias CSISO99NAPLPS// ANSI_X3.110// +module ANSI_X3.110// INTERNAL ANSI_X3.110 1 +module INTERNAL ANSI_X3.110// ANSI_X3.110 1 + +# from to module cost +alias UTF16// UTF-16// +module UTF-16// INTERNAL UTF-16 1 +module INTERNAL UTF-16// UTF-16 1 + +# from to module cost +alias UTF16LE// UTF-16LE// +module UTF-16LE// INTERNAL UTF-16 1 +module INTERNAL UTF-16LE// UTF-16 1 + +# from to module cost +alias UTF16BE// UTF-16BE// +module UTF-16BE// INTERNAL UTF-16 1 +module INTERNAL UTF-16BE// UTF-16 1 + +# from to module cost +alias CSUNICODE// UNICODE// +module UNICODE// INTERNAL UNICODE 1 +module INTERNAL UNICODE// UNICODE 1 + +# from to module cost +alias UTF32// UTF-32// +module UTF-32// INTERNAL UTF-32 1 +module INTERNAL UTF-32// UTF-32 1 + +# from to module cost +alias UTF32LE// UTF-32LE// +module UTF-32LE// INTERNAL UTF-32 1 +module INTERNAL UTF-32LE// UTF-32 1 + +# from to module cost +alias UTF32BE// UTF-32BE// +module UTF-32BE// INTERNAL UTF-32 1 +module INTERNAL UTF-32BE// UTF-32 1 + +# from to module cost +alias UTF7// UTF-7// +module UTF-7// INTERNAL UTF-7 1 +module INTERNAL UTF-7// UTF-7 1 diff --git a/iconvdata/gconv-modules.conf b/iconvdata/gconv-modules.conf deleted file mode 100644 index 4acbba0..0000000 --- a/iconvdata/gconv-modules.conf +++ /dev/null @@ -1,115 +0,0 @@ -# GNU libc iconv configuration. -# Copyright (C) 1997-2021 Free Software Foundation, Inc. -# This file is part of the GNU C Library. - -# The GNU C Library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. - -# The GNU C Library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. - -# You should have received a copy of the GNU Lesser General Public -# License along with the GNU C Library; if not, see -# . - -# All lines contain the following information: - -# If the lines start with `module' -# fromset: either a name triple or a regular expression triple. -# toset: a name triple or an expression with \N to get regular -# expression matching results. -# filename: filename of the module implementing the transformation. -# If it is not absolute the path is made absolute by prepending -# the directory the configuration file is found in. -# cost: optional cost of the transformation. Default is 1. - -# If the lines start with `alias' -# alias: alias name which is not really recognized. -# name: the real name of the character set - -# from to module cost -alias ISO-IR-100// ISO-8859-1// -alias ISO_8859-1:1987// ISO-8859-1// -alias ISO_8859-1// ISO-8859-1// -alias ISO8859-1// ISO-8859-1// -alias ISO88591// ISO-8859-1// -alias LATIN1// ISO-8859-1// -alias L1// ISO-8859-1// -alias IBM819// ISO-8859-1// -alias CP819// ISO-8859-1// -alias CSISOLATIN1// ISO-8859-1// -alias 8859_1// ISO-8859-1// -alias OSF00010001// ISO-8859-1// -module ISO-8859-1// INTERNAL ISO8859-1 1 -module INTERNAL ISO-8859-1// ISO8859-1 1 - -# from to module cost -alias ISO8859-15// ISO-8859-15// -alias ISO885915// ISO-8859-15// -alias ISO-IR-203// ISO-8859-15// -alias ISO_8859-15// ISO-8859-15// -alias LATIN-9// ISO-8859-15// -alias LATIN9// ISO-8859-15// -alias ISO_8859-15:1998// ISO-8859-15// -module ISO-8859-15// INTERNAL ISO8859-15 1 -module INTERNAL ISO-8859-15// ISO8859-15 1 - -# from to module cost -alias MS-ANSI// CP1252// -alias WINDOWS-1252// CP1252// -module CP1252// INTERNAL CP1252 1 -module INTERNAL CP1252// CP1252 1 - -# from to module cost -alias ANSI_X3.110-1983// ANSI_X3.110// -alias ISO-IR-99// ANSI_X3.110// -alias CSA_T500-1983// ANSI_X3.110// -alias CSA_T500// ANSI_X3.110// -alias NAPLPS// ANSI_X3.110// -alias CSISO99NAPLPS// ANSI_X3.110// -module ANSI_X3.110// INTERNAL ANSI_X3.110 1 -module INTERNAL ANSI_X3.110// ANSI_X3.110 1 - -# from to module cost -alias UTF16// UTF-16// -module UTF-16// INTERNAL UTF-16 1 -module INTERNAL UTF-16// UTF-16 1 - -# from to module cost -alias UTF16LE// UTF-16LE// -module UTF-16LE// INTERNAL UTF-16 1 -module INTERNAL UTF-16LE// UTF-16 1 - -# from to module cost -alias UTF16BE// UTF-16BE// -module UTF-16BE// INTERNAL UTF-16 1 -module INTERNAL UTF-16BE// UTF-16 1 - -# from to module cost -alias CSUNICODE// UNICODE// -module UNICODE// INTERNAL UNICODE 1 -module INTERNAL UNICODE// UNICODE 1 - -# from to module cost -alias UTF32// UTF-32// -module UTF-32// INTERNAL UTF-32 1 -module INTERNAL UTF-32// UTF-32 1 - -# from to module cost -alias UTF32LE// UTF-32LE// -module UTF-32LE// INTERNAL UTF-32 1 -module INTERNAL UTF-32LE// UTF-32 1 - -# from to module cost -alias UTF32BE// UTF-32BE// -module UTF-32BE// INTERNAL UTF-32 1 -module INTERNAL UTF-32BE// UTF-32 1 - -# from to module cost -alias UTF7// UTF-7// -module UTF-7// INTERNAL UTF-7 1 -module INTERNAL UTF-7// UTF-7 1 diff --git a/localedata/Makefile b/localedata/Makefile index 364d7c7..14e04cd 100644 --- a/localedata/Makefile +++ b/localedata/Makefile @@ -183,7 +183,7 @@ install-others := $(addprefix $(inst_i18ndir)/, \ $(locales)) endif -tests: $(objdir)/iconvdata/gconv-modules.d/gconv-modules.conf +tests: $(objdir)/iconvdata/gconv-modules tests-static += tst-langinfo-newlocale-static tst-langinfo-setlocale-static @@ -464,5 +464,5 @@ $(objpfx)mtrace-tst-leaks.out: $(objpfx)tst-leaks.out bug-setlocale1-ENV-only = LOCPATH=$(objpfx) LC_CTYPE=de_DE.UTF-8 bug-setlocale1-static-ENV-only = $(bug-setlocale1-ENV-only) -$(objdir)/iconvdata/gconv-modules.d/gconv-modules.conf: +$(objdir)/iconvdata/gconv-modules: $(MAKE) -C ../iconvdata subdir=iconvdata $@ -- cgit v1.1