1# SPDX-License-Identifier: GPL-2.0 2 3obj-$(CONFIG_UNICODE) += unicode.o 4obj-$(CONFIG_UNICODE_NORMALIZATION_SELFTEST) += utf8-selftest.o 5obj-$(CONFIG_UNICODE_UTF8_DATA) += utf8data.o 6 7unicode-y := utf8-norm.o utf8-core.o 8 9$(obj)/utf8-data.o: $(obj)/utf8data.c 10 11# In the normal build, the checked-in utf8data.c is just shipped. 12# 13# To generate utf8data.c from UCD, put *.txt files in this directory 14# and pass REGENERATE_UTF8DATA=1 from the command line. 15ifdef REGENERATE_UTF8DATA 16 17quiet_cmd_utf8data = GEN $@ 18 cmd_utf8data = $< \ 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 \ 26 -o $@ 27 28$(obj)/utf8data.c: $(obj)/mkutf8data $(filter %.txt, $(cmd_utf8data)) FORCE 29 $(call if_changed,utf8data) 30 31else 32 33$(obj)/utf8data.c: $(src)/utf8data.c_shipped FORCE 34 $(call if_changed,shipped) 35 36endif 37 38targets += utf8data.c 39hostprogs += mkutf8data 40