2019-04-25 13:38:44 -04:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
|
2022-01-18 07:56:14 +01:00
|
|
|
ifneq ($(CONFIG_UNICODE),)
|
|
|
|
|
obj-y += unicode.o
|
|
|
|
|
endif
|
|
|
|
|
obj-$(CONFIG_UNICODE) += utf8data.o
|
2024-12-02 15:55:43 +08:00
|
|
|
obj-$(CONFIG_UNICODE_NORMALIZATION_KUNIT_TEST) += tests/utf8_kunit.o
|
2019-04-25 13:51:22 -04:00
|
|
|
|
|
|
|
|
unicode-y := utf8-norm.o utf8-core.o
|
2019-04-25 13:45:46 -04:00
|
|
|
|
2021-09-15 09:00:05 +02:00
|
|
|
$(obj)/utf8-data.o: $(obj)/utf8data.c
|
2019-04-28 13:45:36 -04:00
|
|
|
|
2021-09-15 09:00:05 +02:00
|
|
|
# In the normal build, the checked-in utf8data.c is just shipped.
|
2019-04-28 13:45:36 -04:00
|
|
|
#
|
2021-09-15 09:00:05 +02:00
|
|
|
# To generate utf8data.c from UCD, put *.txt files in this directory
|
2019-04-28 13:45:36 -04:00
|
|
|
# and pass REGENERATE_UTF8DATA=1 from the command line.
|
|
|
|
|
ifdef REGENERATE_UTF8DATA
|
|
|
|
|
|
|
|
|
|
quiet_cmd_utf8data = GEN $@
|
|
|
|
|
cmd_utf8data = $< \
|
2024-04-27 23:55:02 +09:00
|
|
|
-a $(src)/DerivedAge.txt \
|
|
|
|
|
-c $(src)/DerivedCombiningClass.txt \
|
|
|
|
|
-p $(src)/DerivedCoreProperties.txt \
|
|
|
|
|
-d $(src)/UnicodeData.txt \
|
|
|
|
|
-f $(src)/CaseFolding.txt \
|
|
|
|
|
-n $(src)/NormalizationCorrections.txt \
|
|
|
|
|
-t $(src)/NormalizationTest.txt \
|
2019-04-25 13:38:44 -04:00
|
|
|
-o $@
|
2019-04-28 13:45:36 -04:00
|
|
|
|
2021-09-15 09:00:05 +02:00
|
|
|
$(obj)/utf8data.c: $(obj)/mkutf8data $(filter %.txt, $(cmd_utf8data)) FORCE
|
2019-04-28 13:45:36 -04:00
|
|
|
$(call if_changed,utf8data)
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
2021-09-15 09:00:05 +02:00
|
|
|
$(obj)/utf8data.c: $(src)/utf8data.c_shipped FORCE
|
2022-01-25 15:40:27 +09:00
|
|
|
$(call if_changed,copy)
|
2019-04-28 13:45:36 -04:00
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
2021-09-15 09:00:05 +02:00
|
|
|
targets += utf8data.c
|
2020-02-02 01:49:24 +09:00
|
|
|
hostprogs += mkutf8data
|