• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env -S make -f
2
3all: packtab \
4	hb-ot-shape-complex-arabic-joining-list.hh \
5	hb-ot-shape-complex-arabic-table.hh hb-unicode-emoji-table.hh \
6	hb-ot-shape-complex-indic-table.cc hb-ot-tag-table.hh \
7	hb-ucd-table.hh hb-ot-shape-complex-use-table.hh \
8	hb-ot-shape-complex-vowel-constraints.cc
9
10.PHONY: all clean packtab
11
12hb-ot-shape-complex-arabic-joining-list.hh: gen-arabic-joining-list.py ArabicShaping.txt Scripts.txt
13	./$^ > $@ || ($(RM) $@; false)
14hb-ot-shape-complex-arabic-table.hh: gen-arabic-table.py ArabicShaping.txt UnicodeData.txt Blocks.txt
15	./$^ > $@ || ($(RM) $@; false)
16hb-unicode-emoji-table.hh: gen-emoji-table.py emoji-data.txt
17	./$^ > $@ || ($(RM) $@; false)
18hb-ot-shape-complex-indic-table.cc: gen-indic-table.py IndicSyllabicCategory.txt IndicPositionalCategory.txt Blocks.txt
19	./$^ > $@ || ($(RM) $@; false)
20hb-ot-tag-table.hh: gen-tag-table.py languagetags language-subtag-registry
21	./$^ > $@ || ($(RM) $@; false)
22hb-ucd-table.hh: gen-ucd-table.py ucd.nounihan.grouped.zip hb-common.h
23	./$^ > $@ || ($(RM) $@; false)
24hb-ot-shape-complex-use-table.hh: gen-use-table.py IndicSyllabicCategory.txt IndicPositionalCategory.txt UnicodeData.txt ArabicShaping.txt Blocks.txt ms-use/IndicSyllabicCategory-Additional.txt ms-use/IndicPositionalCategory-Additional.txt
25	./$^ > $@ || ($(RM) $@; false)
26hb-ot-shape-complex-vowel-constraints.cc: gen-vowel-constraints.py ms-use/IndicShapingInvalidCluster.txt Scripts.txt
27	./$^ > $@ || ($(RM) $@; false)
28
29packtab:
30	/usr/bin/env python3 -c "import packTab" 2>/dev/null || /usr/bin/env python3 -m pip install git+https://github.com/harfbuzz/packtab
31
32ArabicShaping.txt:
33	curl -O https://unicode.org/Public/UCD/latest/ucd/ArabicShaping.txt
34UnicodeData.txt:
35	curl -O https://unicode.org/Public/UCD/latest/ucd/UnicodeData.txt
36Blocks.txt:
37	curl -O https://unicode.org/Public/UCD/latest/ucd/Blocks.txt
38emoji-data.txt:
39	curl -O https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-data.txt
40IndicSyllabicCategory.txt:
41	curl -O https://unicode.org/Public/UCD/latest/ucd/IndicSyllabicCategory.txt
42IndicPositionalCategory.txt:
43	curl -O https://unicode.org/Public/UCD/latest/ucd/IndicPositionalCategory.txt
44languagetags:
45	curl -O https://docs.microsoft.com/en-us/typography/opentype/spec/languagetags
46language-subtag-registry:
47	curl -O https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
48ucd.nounihan.grouped.zip:
49	curl -O https://unicode.org/Public/UCD/latest/ucdxml/ucd.nounihan.grouped.zip
50Scripts.txt:
51	curl -O https://unicode.org/Public/UCD/latest/ucd/Scripts.txt
52
53clean:
54	$(RM) \
55		ArabicShaping.txt UnicodeData.txt Blocks.txt emoji-data.txt \
56		IndicSyllabicCategory.txt IndicPositionalCategory.txt \
57		languagetags language-subtag-registry ucd.nounihan.grouped.zip Scripts.txt
58