xref: /kernel/linux/linux-5.10/fs/unicode/Makefile (revision 8c2ecf20)
18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciobj-$(CONFIG_UNICODE) += unicode.o
48c2ecf20Sopenharmony_ciobj-$(CONFIG_UNICODE_NORMALIZATION_SELFTEST) += utf8-selftest.o
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ciunicode-y := utf8-norm.o utf8-core.o
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci$(obj)/utf8-norm.o: $(obj)/utf8data.h
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci# In the normal build, the checked-in utf8data.h is just shipped.
118c2ecf20Sopenharmony_ci#
128c2ecf20Sopenharmony_ci# To generate utf8data.h from UCD, put *.txt files in this directory
138c2ecf20Sopenharmony_ci# and pass REGENERATE_UTF8DATA=1 from the command line.
148c2ecf20Sopenharmony_ciifdef REGENERATE_UTF8DATA
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciquiet_cmd_utf8data = GEN     $@
178c2ecf20Sopenharmony_ci      cmd_utf8data = $< \
188c2ecf20Sopenharmony_ci		-a $(srctree)/$(src)/DerivedAge.txt \
198c2ecf20Sopenharmony_ci		-c $(srctree)/$(src)/DerivedCombiningClass.txt \
208c2ecf20Sopenharmony_ci		-p $(srctree)/$(src)/DerivedCoreProperties.txt \
218c2ecf20Sopenharmony_ci		-d $(srctree)/$(src)/UnicodeData.txt \
228c2ecf20Sopenharmony_ci		-f $(srctree)/$(src)/CaseFolding.txt \
238c2ecf20Sopenharmony_ci		-n $(srctree)/$(src)/NormalizationCorrections.txt \
248c2ecf20Sopenharmony_ci		-t $(srctree)/$(src)/NormalizationTest.txt \
258c2ecf20Sopenharmony_ci		-o $@
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci$(obj)/utf8data.h: $(obj)/mkutf8data $(filter %.txt, $(cmd_utf8data)) FORCE
288c2ecf20Sopenharmony_ci	$(call if_changed,utf8data)
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_cielse
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci$(obj)/utf8data.h: $(src)/utf8data.h_shipped FORCE
338c2ecf20Sopenharmony_ci	$(call if_changed,shipped)
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciendif
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_citargets += utf8data.h
388c2ecf20Sopenharmony_cihostprogs += mkutf8data
39