about summary refs log tree commit diff
path: root/iconvdata/Makefile
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2021-06-07 14:22:20 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2021-06-09 09:47:16 +0530
commitfc5bfade69ca12d034967dc6b929dbe3dd715172 (patch)
tree841bee58b3ec3c8f8203992fa0f94d7f125885a3 /iconvdata/Makefile
parentb17d29b390154df9dfad9d21f1e6605422521fd2 (diff)
downloadglibc-fc5bfade69ca12d034967dc6b929dbe3dd715172.tar.gz
glibc-fc5bfade69ca12d034967dc6b929dbe3dd715172.tar.xz
glibc-fc5bfade69ca12d034967dc6b929dbe3dd715172.zip
iconvdata: Move gconv-modules configuration to gconv-modules.conf
Move all gconv-modules configuration files to gconv-modules.conf.
That is, the S390 extensions now become gconv-modules-s390.conf.  Move
both configuration files into gconv-modules.d.

Now GCONV_PATH/gconv-modules is read only for backward compatibility
for third-party gconv modules directories.

Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'iconvdata/Makefile')
-rw-r--r--iconvdata/Makefile46
1 files changed, 28 insertions, 18 deletions
diff --git a/iconvdata/Makefile b/iconvdata/Makefile
index 6eeb92f4b3..8925a684eb 100644
--- a/iconvdata/Makefile
+++ b/iconvdata/Makefile
@@ -137,10 +137,13 @@ charmaps = ../localedata/charmaps
 extra-modules-left := $(modules)
 include extra-module.mk
 
+gconv-modules = gconv-modules.conf
+modpfx = $(objpfx)gconv-modules.d/
 
 extra-objs	+= $(modules.so)
 install-others	= $(addprefix $(inst_gconvdir)/, $(modules.so))	\
-		  $(inst_gconvdir)/gconv-modules
+		  $(addprefix $(inst_gconvdir)/gconv-modules.d/, \
+			      $(gconv-modules))
 
 # We can build the conversion tables for numerous charsets automatically.
 
@@ -182,7 +185,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 += gconv-modules
+generated += $(addprefix gconv-modules.d/,$(gconv-modules))
 endif
 
 # Rules to generate the headers.
@@ -250,7 +253,8 @@ headers: $(addprefix $(objpfx), $(generated-modules:=.h))
 $(addprefix $(inst_gconvdir)/, $(modules.so)): \
     $(inst_gconvdir)/%: $(objpfx)% $(+force)
 	$(do-install-program)
-$(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules $(+force)
+$(addprefix $(inst_gconvdir)/gconv-modules.d/, $(gconv-modules)): \
+    $(inst_gconvdir)/gconv-modules.d/%: $(modpfx)% $(+force)
 	$(do-install)
 ifeq (no,$(cross-compiling))
 # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary
@@ -303,28 +307,29 @@ $(objpfx)mtrace-tst-loading.out: $(objpfx)tst-loading.out
 	$(common-objpfx)malloc/mtrace $(objpfx)tst-loading.mtrace > $@; \
 	$(evaluate-test)
 
-$(objpfx)bug-iconv1.out: $(objpfx)gconv-modules \
+$(objpfx)bug-iconv1.out: $(addprefix $(modpfx), $(gconv-modules)) \
 			 $(addprefix $(objpfx),$(modules.so))
-$(objpfx)bug-iconv2.out: $(objpfx)gconv-modules \
+$(objpfx)bug-iconv2.out: $(addprefix $(modpfx), $(gconv-modules)) \
 			 $(addprefix $(objpfx),$(modules.so))
-$(objpfx)bug-iconv3.out: $(objpfx)gconv-modules \
+$(objpfx)bug-iconv3.out: $(addprefix $(modpfx), $(gconv-modules)) \
 			 $(addprefix $(objpfx),$(modules.so))
-$(objpfx)bug-iconv5.out: $(objpfx)gconv-modules \
+$(objpfx)bug-iconv5.out: $(addprefix $(modpfx), $(gconv-modules)) \
 			 $(addprefix $(objpfx),$(modules.so))
-$(objpfx)tst-loading.out: $(objpfx)gconv-modules \
+$(objpfx)tst-loading.out: $(addprefix $(modpfx), $(gconv-modules)) \
 			  $(addprefix $(objpfx),$(modules.so))
-$(objpfx)tst-iconv4.out: $(objpfx)gconv-modules \
+$(objpfx)tst-iconv4.out: $(addprefix $(modpfx), $(gconv-modules)) \
 			 $(addprefix $(objpfx),$(modules.so))
-$(objpfx)tst-iconv7.out: $(objpfx)gconv-modules \
+$(objpfx)tst-iconv7.out: $(addprefix $(modpfx), $(gconv-modules)) \
 			 $(addprefix $(objpfx),$(modules.so))
-$(objpfx)bug-iconv10.out: $(objpfx)gconv-modules \
+$(objpfx)bug-iconv10.out: $(addprefix $(modpfx), $(gconv-modules)) \
 			  $(addprefix $(objpfx),$(modules.so))
-$(objpfx)bug-iconv12.out: $(objpfx)gconv-modules \
+$(objpfx)bug-iconv12.out: $(addprefix $(modpfx), $(gconv-modules)) \
 			  $(addprefix $(objpfx),$(modules.so))
-$(objpfx)bug-iconv14.out: $(objpfx)gconv-modules \
+$(objpfx)bug-iconv14.out: $(addprefix $(modpfx), $(gconv-modules)) \
 			  $(addprefix $(objpfx),$(modules.so))
 
-$(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \
+$(objpfx)iconv-test.out: run-iconv-test.sh \
+			 $(addprefix $(modpfx), $(gconv-modules)) \
 			 $(addprefix $(objpfx),$(modules.so)) \
 			 $(common-objdir)/iconv/iconv_prog TESTS
 	iconv_modules="$(modules)" \
@@ -332,7 +337,8 @@ $(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \
 		 '$(run-program-env)' > $@; \
 	$(evaluate-test)
 
-$(objpfx)tst-tables.out: tst-tables.sh $(objpfx)gconv-modules \
+$(objpfx)tst-tables.out: tst-tables.sh \
+			 $(addprefix $(modpfx), $(gconv-modules)) \
 			 $(addprefix $(objpfx),$(modules.so)) \
 			 $(objpfx)tst-table-from $(objpfx)tst-table-to
 	$(SHELL) $< $(common-objpfx) $(common-objpfx)iconvdata/ \
@@ -345,9 +351,13 @@ do-tests-clean common-mostlyclean: tst-tables-clean
 tst-tables-clean:
 	-rm -f $(objpfx)tst-*.table $(objpfx)tst-EUC-TW.irreversible
 
-$(objpfx)gconv-modules: gconv-modules
-	cat $(sysdeps-gconv-modules) $^ > $@
+$(modpfx):
+	mkdir -p $@
+
+$(modpfx)%: % $(modpfx)
+	cp $< $@
 
 # Test requires BIG5HKSCS.
-$(objpfx)tst-iconv-big5-hkscs-to-2ucs4.out: $(objpfx)gconv-modules \
+$(objpfx)tst-iconv-big5-hkscs-to-2ucs4.out: \
+			 $(addprefix $(modpfx), $(gconv-modules)) \
 			 $(addprefix $(objpfx),$(modules.so))