string: Enable __FORTIFY_LEVEL=3
[glibc.git] / gen-locales.mk
blob9c523d2a0585216cbc3e5e41784a813abb42b22c
1 # defines target $(gen-locales) that generates the locales given in $(LOCALES)
3 LOCALE_SRCS := $(shell echo "$(LOCALES)"|sed 's/\([^ .]*\)[^@ ]*\(@[^ ]*\)\?/\1\2/g')
4 CHARMAPS := $(shell echo "$(LOCALES)" | \
5 sed -e 's/[^ .]*[.]\([^@ ]*\)\(@[^@ ]*\)*/\1/g' -e s/SJIS/SHIFT_JIS/g)
6 CTYPE_FILES = $(addsuffix /LC_CTYPE,$(LOCALES))
7 gen-locales := $(addprefix $(common-objpfx)localedata/,$(CTYPE_FILES))
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)