1 # SPDX-License-Identifier: GPL-2.0
3 obj-$(CONFIG_UNICODE) += unicode.o
4 obj-$(CONFIG_UNICODE_NORMALIZATION_SELFTEST) += utf8-selftest.o
5 obj-$(CONFIG_UNICODE_UTF8_DATA) += utf8data.o
7 unicode-y := utf8-norm.o utf8-core.o
9 $(obj)/utf8-data.o: $(obj)/utf8data.c
11 # In the normal build, the checked-in utf8data.c is just shipped.
13 # To generate utf8data.c from UCD, put *.txt files in this directory
14 # and pass REGENERATE_UTF8DATA=1 from the command line.
15 ifdef REGENERATE_UTF8DATA
17 quiet_cmd_utf8data = GEN $@
19 -a $(srctree)/$(src)/DerivedAge.txt \
20 -c $(srctree)/$(src)/DerivedCombiningClass.txt \
21 -p $(srctree)/$(src)/DerivedCoreProperties.txt \
22 -d $(srctree)/$(src)/UnicodeData.txt \
23 -f $(srctree)/$(src)/CaseFolding.txt \
24 -n $(srctree)/$(src)/NormalizationCorrections.txt \
25 -t $(srctree)/$(src)/NormalizationTest.txt \
28 $(obj)/utf8data.c: $(obj)/mkutf8data $(filter %.txt, $(cmd_utf8data)) FORCE
29 $(call if_changed,utf8data)
33 $(obj)/utf8data.c: $(src)/utf8data.c_shipped FORCE
34 $(call if_changed,shipped)
39 hostprogs += mkutf8data