Gabriel Krisman Bertazi | 955405d | 2019-04-25 13:38:44 -0400 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | |
Gabriel Krisman Bertazi | 9d53690 | 2019-04-25 13:51:22 -0400 | [diff] [blame] | 3 | obj-$(CONFIG_UNICODE) += unicode.o |
Gabriel Krisman Bertazi | f0d6cc0 | 2019-04-25 13:56:01 -0400 | [diff] [blame] | 4 | obj-$(CONFIG_UNICODE_NORMALIZATION_SELFTEST) += utf8-selftest.o |
Gabriel Krisman Bertazi | 9d53690 | 2019-04-25 13:51:22 -0400 | [diff] [blame] | 5 | |
| 6 | unicode-y := utf8-norm.o utf8-core.o |
Olaf Weber | 44594c2 | 2019-04-25 13:45:46 -0400 | [diff] [blame] | 7 | |
Masahiro Yamada | 28ba53c | 2019-04-28 13:45:36 -0400 | [diff] [blame] | 8 | $(obj)/utf8-norm.o: $(obj)/utf8data.h |
| 9 | |
| 10 | # In the normal build, the checked-in utf8data.h is just shipped. |
| 11 | # |
| 12 | # To generate utf8data.h from UCD, put *.txt files in this directory |
| 13 | # and pass REGENERATE_UTF8DATA=1 from the command line. |
| 14 | ifdef REGENERATE_UTF8DATA |
| 15 | |
| 16 | quiet_cmd_utf8data = GEN $@ |
| 17 | cmd_utf8data = $< \ |
| 18 | -a $(srctree)/$(src)/DerivedAge.txt \ |
| 19 | -c $(srctree)/$(src)/DerivedCombiningClass.txt \ |
| 20 | -p $(srctree)/$(src)/DerivedCoreProperties.txt \ |
| 21 | -d $(srctree)/$(src)/UnicodeData.txt \ |
| 22 | -f $(srctree)/$(src)/CaseFolding.txt \ |
| 23 | -n $(srctree)/$(src)/NormalizationCorrections.txt \ |
| 24 | -t $(srctree)/$(src)/NormalizationTest.txt \ |
Gabriel Krisman Bertazi | 955405d | 2019-04-25 13:38:44 -0400 | [diff] [blame] | 25 | -o $@ |
Masahiro Yamada | 28ba53c | 2019-04-28 13:45:36 -0400 | [diff] [blame] | 26 | |
| 27 | $(obj)/utf8data.h: $(obj)/mkutf8data $(filter %.txt, $(cmd_utf8data)) FORCE |
| 28 | $(call if_changed,utf8data) |
| 29 | |
| 30 | else |
| 31 | |
| 32 | $(obj)/utf8data.h: $(src)/utf8data.h_shipped FORCE |
| 33 | $(call if_changed,shipped) |
| 34 | |
| 35 | endif |
| 36 | |
| 37 | targets += utf8data.h |
| 38 | hostprogs-y += mkutf8data |