b6c903
commit 06a1b794073c4d6adbfb2e4b11339985a14d7a00
b6c903
Author: Siddhesh Poyarekar <siddhesh@sourceware.org>
b6c903
Date:   Mon Jun 14 11:09:56 2021 +0530
b6c903
b6c903
    Reinstate gconv-modules as the default configuration file
b6c903
    
b6c903
    Reinstate gconv-modules as the main file so that the configuration
b6c903
    files in gconv-modules.d/ become add-on configuration.  With this, the
b6c903
    effective user visible change is that GCONV_PATH can now have
b6c903
    supplementary configuration in GCONV_PATH/gconv-modules.d/ in addition
b6c903
    to the main GCONV_PATH/gconv-modules file.
b6c903
b6c903
# Conflicts:
b6c903
#	iconvdata/Makefile
b6c903
b6c903
diff --git a/iconvdata/Makefile b/iconvdata/Makefile
b6c903
index d682a98b5c4a8003..95e5fb8f722a513b 100644
b6c903
--- a/iconvdata/Makefile
b6c903
+++ b/iconvdata/Makefile
b6c903
@@ -136,13 +136,12 @@ charmaps = ../localedata/charmaps
b6c903
 extra-modules-left := $(modules)
b6c903
 include extra-module.mk
b6c903
 
b6c903
-gconv-modules = gconv-modules.conf gconv-modules-extra.conf
b6c903
+gconv-modules = gconv-modules gconv-modules.d/gconv-modules-extra.conf
b6c903
 modpfx = $(objpfx)gconv-modules.d/
b6c903
 
b6c903
 extra-objs	+= $(modules.so)
b6c903
 install-others	= $(addprefix $(inst_gconvdir)/, $(modules.so))	\
b6c903
-		  $(addprefix $(inst_gconvdir)/gconv-modules.d/, \
b6c903
-			      $(gconv-modules))
b6c903
+		  $(addprefix $(inst_gconvdir)/, $(gconv-modules))
b6c903
 
b6c903
 # We can build the conversion tables for numerous charsets automatically.
b6c903
 
b6c903
@@ -184,7 +183,7 @@ generated += $(generated-modules:=.h) $(generated-modules:=.stmp) \
b6c903
 	     iconv-test.out iconv-rules tst-loading.mtrace	 \
b6c903
 	     mtrace-tst-loading.out tst-tables.out iconv-test.xxx
b6c903
 ifdef objpfx
b6c903
-generated += $(addprefix gconv-modules.d/,$(gconv-modules))
b6c903
+generated += $(gconv-modules)
b6c903
 endif
b6c903
 
b6c903
 # Rules to generate the headers.
b6c903
@@ -252,8 +251,8 @@ headers: $(addprefix $(objpfx), $(generated-modules:=.h))
b6c903
 $(addprefix $(inst_gconvdir)/, $(modules.so)): \
b6c903
     $(inst_gconvdir)/%: $(objpfx)% $(+force)
b6c903
 	$(do-install-program)
b6c903
-$(addprefix $(inst_gconvdir)/gconv-modules.d/, $(gconv-modules)): \
b6c903
-    $(inst_gconvdir)/gconv-modules.d/%: $(modpfx)% $(+force)
b6c903
+$(addprefix $(inst_gconvdir)/, $(gconv-modules)): \
b6c903
+    $(inst_gconvdir)/%: $(objpfx)% $(+force)
b6c903
 	$(do-install)
b6c903
 ifeq (no,$(cross-compiling))
b6c903
 # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary
b6c903
@@ -301,30 +300,30 @@ $(objpfx)mtrace-tst-loading.out: $(objpfx)tst-loading.out
b6c903
 	$(common-objpfx)malloc/mtrace $(objpfx)tst-loading.mtrace > $@; \
b6c903
 	$(evaluate-test)
b6c903
 
b6c903
-$(objpfx)bug-iconv1.out: $(addprefix $(modpfx), $(gconv-modules)) \
b6c903
+$(objpfx)bug-iconv1.out: $(addprefix $(objpfx), $(gconv-modules)) \
b6c903
 			 $(addprefix $(objpfx),$(modules.so))
b6c903
-$(objpfx)bug-iconv2.out: $(addprefix $(modpfx), $(gconv-modules)) \
b6c903
+$(objpfx)bug-iconv2.out: $(addprefix $(objpfx), $(gconv-modules)) \
b6c903
 			 $(addprefix $(objpfx),$(modules.so))
b6c903
 $(objpfx)bug-iconv3: $(libdl)
b6c903
-$(objpfx)bug-iconv3.out: $(addprefix $(modpfx), $(gconv-modules)) \
b6c903
+$(objpfx)bug-iconv3.out: $(addprefix $(objpfx), $(gconv-modules)) \
b6c903
 			 $(addprefix $(objpfx),$(modules.so))
b6c903
-$(objpfx)bug-iconv5.out: $(addprefix $(modpfx), $(gconv-modules)) \
b6c903
+$(objpfx)bug-iconv5.out: $(addprefix $(objpfx), $(gconv-modules)) \
b6c903
 			 $(addprefix $(objpfx),$(modules.so))
b6c903
-$(objpfx)tst-loading.out: $(addprefix $(modpfx), $(gconv-modules)) \
b6c903
+$(objpfx)tst-loading.out: $(addprefix $(objpfx), $(gconv-modules)) \
b6c903
 			  $(addprefix $(objpfx),$(modules.so))
b6c903
-$(objpfx)tst-iconv4.out: $(addprefix $(modpfx), $(gconv-modules)) \
b6c903
+$(objpfx)tst-iconv4.out: $(addprefix $(objpfx), $(gconv-modules)) \
b6c903
 			 $(addprefix $(objpfx),$(modules.so))
b6c903
-$(objpfx)tst-iconv7.out: $(addprefix $(modpfx), $(gconv-modules)) \
b6c903
+$(objpfx)tst-iconv7.out: $(addprefix $(objpfx), $(gconv-modules)) \
b6c903
 			 $(addprefix $(objpfx),$(modules.so))
b6c903
-$(objpfx)bug-iconv10.out: $(addprefix $(modpfx), $(gconv-modules)) \
b6c903
+$(objpfx)bug-iconv10.out: $(addprefix $(objpfx), $(gconv-modules)) \
b6c903
 			  $(addprefix $(objpfx),$(modules.so))
b6c903
-$(objpfx)bug-iconv12.out: $(addprefix $(modpfx), $(gconv-modules)) \
b6c903
+$(objpfx)bug-iconv12.out: $(addprefix $(objpfx), $(gconv-modules)) \
b6c903
 			  $(addprefix $(objpfx),$(modules.so))
b6c903
-$(objpfx)bug-iconv14.out: $(addprefix $(modpfx), $(gconv-modules)) \
b6c903
+$(objpfx)bug-iconv14.out: $(addprefix $(objpfx), $(gconv-modules)) \
b6c903
 			  $(addprefix $(objpfx),$(modules.so))
b6c903
 
b6c903
 $(objpfx)iconv-test.out: run-iconv-test.sh \
b6c903
-			 $(addprefix $(modpfx), $(gconv-modules)) \
b6c903
+			 $(addprefix $(objpfx), $(gconv-modules)) \
b6c903
 			 $(addprefix $(objpfx),$(modules.so)) \
b6c903
 			 $(common-objdir)/iconv/iconv_prog TESTS
b6c903
 	iconv_modules="$(modules)" \
b6c903
@@ -333,7 +332,7 @@ $(objpfx)iconv-test.out: run-iconv-test.sh \
b6c903
 	$(evaluate-test)
b6c903
 
b6c903
 $(objpfx)tst-tables.out: tst-tables.sh \
b6c903
-			 $(addprefix $(modpfx), $(gconv-modules)) \
b6c903
+			 $(addprefix $(objpfx), $(gconv-modules)) \
b6c903
 			 $(addprefix $(objpfx),$(modules.so)) \
b6c903
 			 $(objpfx)tst-table-from $(objpfx)tst-table-to
b6c903
 	$(SHELL) $< $(common-objpfx) $(common-objpfx)iconvdata/ \
b6c903
@@ -351,3 +350,6 @@ $(modpfx):
b6c903
 
b6c903
 $(modpfx)%: % $(modpfx)
b6c903
 	cp $< $@
b6c903
+
b6c903
+$(objpfx)gconv-modules: gconv-modules
b6c903
+	cp $^ $@
b6c903
diff --git a/iconvdata/gconv-modules.conf b/iconvdata/gconv-modules
b6c903
similarity index 100%
b6c903
rename from iconvdata/gconv-modules.conf
b6c903
rename to iconvdata/gconv-modules
b6c903
diff --git a/localedata/Makefile b/localedata/Makefile
b6c903
index a5ca7a31f43d50c3..14fcc37fed21e740 100644
b6c903
--- a/localedata/Makefile
b6c903
+++ b/localedata/Makefile
b6c903
@@ -179,7 +179,7 @@ install-others := $(addprefix $(inst_i18ndir)/, \
b6c903
 			      $(locales))
b6c903
 endif
b6c903
 
b6c903
-tests: $(objdir)/iconvdata/gconv-modules.d/gconv-modules.conf
b6c903
+tests: $(objdir)/iconvdata/gconv-modules
b6c903
 
b6c903
 tests-static += tst-langinfo-newlocale-static tst-langinfo-setlocale-static
b6c903
 
b6c903
@@ -442,5 +442,5 @@ $(objpfx)mtrace-tst-leaks.out: $(objpfx)tst-leaks.out
b6c903
 bug-setlocale1-ENV-only = LOCPATH=$(objpfx) LC_CTYPE=de_DE.UTF-8
b6c903
 bug-setlocale1-static-ENV-only = $(bug-setlocale1-ENV-only)
b6c903
 
b6c903
-$(objdir)/iconvdata/gconv-modules.d/gconv-modules.conf:
b6c903
+$(objdir)/iconvdata/gconv-modules:
b6c903
 	$(MAKE) -C ../iconvdata subdir=iconvdata $@