diff options
Diffstat (limited to 'localedata/Makefile')
-rw-r--r-- | localedata/Makefile | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/localedata/Makefile b/localedata/Makefile index e7e15ebfef..1f5bf3b092 100644 --- a/localedata/Makefile +++ b/localedata/Makefile @@ -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 |