Include SUPPORTED.
authordrepper <drepper>
Fri, 29 Jun 2001 00:30:37 +0000 (00:30 +0000)
committerdrepper <drepper>
Fri, 29 Jun 2001 00:30:37 +0000 (00:30 +0000)
(INSTALL-SUPPORTED-LOCALES): New.
($(INSTALL-SUPPORTED-LOCALES)): New target.
(install-locales-dir): Likewise.
(install-locales): Depend on $(INSTALL-SUPPORTED-LOCALES).

localedata/Makefile

index e7e15eb..1f5bf3b 100644 (file)
@@ -191,22 +191,30 @@ $(objpfx)tst-langinfo.out: tst-langinfo.sh $(objpfx)tst-langinfo \
 $(objpfx)tst-digits.out: $(objpfx)tst-locale.out
 endif
 
+include SUPPORTED
+
+INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES))
+
 # Sometimes the whole collection of locale files should be installed.
 LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
 $(common-objpfx)elf/ld.so --library-path $(rpath-link) $(common-objpfx)locale/localedef
-install-locales:
+install-locales: $(INSTALL-SUPPORTED-LOCALES)
+
+install-locales-dir:
        $(..)./scripts/mkinstalldirs $(inst_localedir)
-       while read locale charset; do \
-          case $$locale in \#*) continue;; esac; \
-          echo -n `echo $$locale | sed 's/\([^.\@]*\).*/\1/'`; \
-          echo -n ".$$charset"; \
-          echo -n `echo $$locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
-          echo -n '...'; \
-          input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
-          $(LOCALEDEF) -i locales/$$input -c -f charmaps/$$charset \
-                       $(addprefix --prefix=,$(install_root)) $$locale; \
-          echo ' done'; \
-       done < SUPPORTED
+
+$(INSTALL-SUPPORTED-LOCALES): install-locales-dir
+       @locale=`echo $@ | sed -e 's/^install-//'`; \
+       charset=`echo $$locale | sed -e 's,.*/,,'`; \
+       locale=`echo $$locale | sed -e 's,/[^/]*,,'`; \
+       echo -n `echo $$locale | sed 's/\([^.\@]*\).*/\1/'`; \
+       echo -n ".$$charset"; \
+       echo -n `echo $$locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
+       echo -n '...'; \
+       input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
+       $(LOCALEDEF) -i locales/$$input -c -f charmaps/$$charset \
+               $(addprefix --prefix=,$(install_root)) $$locale; \
+       echo ' done'; \
 
 # The mbwc-tests need some environment setup to find the locale data files
 TEST_MBWC_ENV:= LOCPATH=$(common-objpfx)localedata