blob: fd88b5bef16c0fa5f2706fa7c1b381bc7f06182b [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001# defines target $(gen-locales) that generates the locales given in $(LOCALES)
2
3LOCALE_SRCS := $(shell echo "$(LOCALES)"|sed 's/\([^ .]*\)[^ ]*/\1/g')
4CHARMAPS := $(shell echo "$(LOCALES)" | \
5 sed -e 's/[^ .]*[.]\([^ ]*\)/\1/g' -e s/SJIS/SHIFT_JIS/g)
6CTYPE_FILES = $(addsuffix /LC_CTYPE,$(LOCALES))
7gen-locales := $(addprefix $(common-objpfx)localedata/,$(CTYPE_FILES))
8
9# Dependency for the locale files. We actually make it depend only on
10# one of the files.
11$(addprefix $(common-objpfx)localedata/,$(CTYPE_FILES)): %: \
12 ../localedata/gen-locale.sh \
13 $(common-objpfx)locale/localedef \
14 ../localedata/Makefile \
15 $(addprefix ../localedata/charmaps/,$(CHARMAPS)) \
16 $(addprefix ../localedata/locales/,$(LOCALE_SRCS))
17 @$(SHELL) ../localedata/gen-locale.sh $(common-objpfx) \
18 '$(built-program-cmd-before-env)' '$(run-program-env)' \
19 '$(built-program-cmd-after-env)' $@; \
20 $(evaluate-test)