42 lines · plain
1# SPDX-License-Identifier: GPL-2.02 3ifneq ($(CONFIG_UNICODE),)4obj-y += unicode.o5endif6obj-$(CONFIG_UNICODE) += utf8data.o7obj-$(CONFIG_UNICODE_NORMALIZATION_SELFTEST) += utf8-selftest.o8 9unicode-y := utf8-norm.o utf8-core.o10 11$(obj)/utf8-data.o: $(obj)/utf8data.c12 13# In the normal build, the checked-in utf8data.c is just shipped.14#15# To generate utf8data.c from UCD, put *.txt files in this directory16# and pass REGENERATE_UTF8DATA=1 from the command line.17ifdef REGENERATE_UTF8DATA18 19quiet_cmd_utf8data = GEN $@20 cmd_utf8data = $< \21 -a $(src)/DerivedAge.txt \22 -c $(src)/DerivedCombiningClass.txt \23 -p $(src)/DerivedCoreProperties.txt \24 -d $(src)/UnicodeData.txt \25 -f $(src)/CaseFolding.txt \26 -n $(src)/NormalizationCorrections.txt \27 -t $(src)/NormalizationTest.txt \28 -o $@29 30$(obj)/utf8data.c: $(obj)/mkutf8data $(filter %.txt, $(cmd_utf8data)) FORCE31 $(call if_changed,utf8data)32 33else34 35$(obj)/utf8data.c: $(src)/utf8data.c_shipped FORCE36 $(call if_changed,copy)37 38endif39 40targets += utf8data.c41hostprogs += mkutf8data42