Makefile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # SPDX-License-Identifier: GPL-2.0
  2. obj-$(CONFIG_UNICODE) += unicode.o
  3. obj-$(CONFIG_UNICODE_NORMALIZATION_SELFTEST) += utf8-selftest.o
  4. unicode-y := utf8-norm.o utf8-core.o
  5. $(obj)/utf8-norm.o: $(obj)/utf8data.h
  6. # In the normal build, the checked-in utf8data.h is just shipped.
  7. #
  8. # To generate utf8data.h from UCD, put *.txt files in this directory
  9. # and pass REGENERATE_UTF8DATA=1 from the command line.
  10. ifdef REGENERATE_UTF8DATA
  11. quiet_cmd_utf8data = GEN $@
  12. cmd_utf8data = $< \
  13. -a $(srctree)/$(src)/DerivedAge.txt \
  14. -c $(srctree)/$(src)/DerivedCombiningClass.txt \
  15. -p $(srctree)/$(src)/DerivedCoreProperties.txt \
  16. -d $(srctree)/$(src)/UnicodeData.txt \
  17. -f $(srctree)/$(src)/CaseFolding.txt \
  18. -n $(srctree)/$(src)/NormalizationCorrections.txt \
  19. -t $(srctree)/$(src)/NormalizationTest.txt \
  20. -o $@
  21. $(obj)/utf8data.h: $(obj)/mkutf8data $(filter %.txt, $(cmd_utf8data)) FORCE
  22. $(call if_changed,utf8data)
  23. else
  24. $(obj)/utf8data.h: $(src)/utf8data.h_shipped FORCE
  25. $(call if_changed,shipped)
  26. endif
  27. targets += utf8data.h
  28. hostprogs += mkutf8data