| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
UNICODE_VERSION = 17.0.0 |
| 40 |
|
| 41 |
PYTHON3 = python3 |
| 42 |
WGET = wget |
| 43 |
|
| 44 |
DOWNLOADS = UnicodeData.txt DerivedCoreProperties.txt EastAsianWidth.txt HangulSyllableType.txt |
| 45 |
LICENSE = unicode-license.txt |
| 46 |
GENERATED = i18n_ctype tr_TR UTF-8 translit_combining translit_compat translit_circle translit_cjk_compat translit_font translit_fraction |
| 47 |
REPORTS = i18n_ctype-report UTF-8-report |
| 48 |
|
| 49 |
all: $(GENERATED) |
| 50 |
|
| 51 |
check: check-i18n_ctype check-UTF-8 |
| 52 |
|
| 53 |
install: |
| 54 |
cp -p i18n_ctype ../locales/i18n_ctype |
| 55 |
cp -p tr_TR ../locales/tr_TR |
| 56 |
cp -p UTF-8 ../charmaps/UTF-8 |
| 57 |
cp -p translit_combining ../locales/translit_combining |
| 58 |
cp -p translit_compat ../locales/translit_compat |
| 59 |
cp -p translit_circle ../locales/translit_circle |
| 60 |
cp -p translit_cjk_compat ../locales/translit_cjk_compat |
| 61 |
cp -p translit_font ../locales/translit_font |
| 62 |
cp -p translit_fraction ../locales/translit_fraction |
| 63 |
|
| 64 |
clean: mostlyclean |
| 65 |
-rm -rf __pycache__ |
| 66 |
mostlyclean: |
| 67 |
-rm -f $(REPORTS) $(GENERATED) |
| 68 |
|
| 69 |
.PHONY: all check clean mostlyclean install |
| 70 |
|
| 71 |
i18n_ctype: UnicodeData.txt DerivedCoreProperties.txt |
| 72 |
i18n_ctype: ../locales/i18n_ctype |
| 73 |
i18n_ctype: gen_unicode_ctype.py |
| 74 |
$(PYTHON3) gen_unicode_ctype.py -u UnicodeData.txt \ |
| 75 |
-d DerivedCoreProperties.txt -i ../locales/i18n_ctype -o $@ \ |
| 76 |
--unicode_version $(UNICODE_VERSION) |
| 77 |
|
| 78 |
i18n_ctype-report: i18n_ctype ../locales/i18n_ctype |
| 79 |
i18n_ctype-report: ctype_compatibility.py ctype_compatibility_test_cases.py |
| 80 |
$(PYTHON3) ./ctype_compatibility.py -o ../locales/i18n_ctype \ |
| 81 |
-n i18n_ctype -a -m > $@ |
| 82 |
|
| 83 |
check-i18n_ctype: i18n_ctype-report |
| 84 |
@if grep '\(Missing\|Added\) [^0]\|^Number of errors[^=]* = [^0]' \ |
| 85 |
i18n_ctype-report; \ |
| 86 |
then echo manual verification required; false; else true; fi |
| 87 |
|
| 88 |
tr_TR: UnicodeData.txt DerivedCoreProperties.txt |
| 89 |
tr_TR: ../locales/tr_TR |
| 90 |
tr_TR: gen_unicode_ctype.py |
| 91 |
$(PYTHON3) gen_unicode_ctype.py -u UnicodeData.txt \ |
| 92 |
-d DerivedCoreProperties.txt -i ../locales/tr_TR -o $@ \ |
| 93 |
--unicode_version $(UNICODE_VERSION) --turkish |
| 94 |
|
| 95 |
UTF-8: UnicodeData.txt DerivedCoreProperties.txt EastAsianWidth.txt HangulSyllableType.txt |
| 96 |
UTF-8: utf8_gen.py |
| 97 |
$(PYTHON3) utf8_gen.py -u UnicodeData.txt \ |
| 98 |
-d DerivedCoreProperties.txt \ |
| 99 |
-e EastAsianWidth.txt \ |
| 100 |
-k HangulSyllableType.txt \ |
| 101 |
--unicode_version $(UNICODE_VERSION) |
| 102 |
|
| 103 |
UTF-8-report: UTF-8 ../charmaps/UTF-8 |
| 104 |
UTF-8-report: utf8_compatibility.py |
| 105 |
$(PYTHON3) ./utf8_compatibility.py -u UnicodeData.txt \ |
| 106 |
-e EastAsianWidth.txt -o ../charmaps/UTF-8 \ |
| 107 |
-n UTF-8 -a -m -c > $@ |
| 108 |
|
| 109 |
check-UTF-8: UTF-8-report |
| 110 |
@if grep '^Total.*: [^0]' UTF-8-report; \ |
| 111 |
then echo manual verification required; false; else true; fi |
| 112 |
|
| 113 |
translit_combining: UnicodeData.txt |
| 114 |
translit_combining: gen_translit_combining.py |
| 115 |
$(PYTHON3) ./gen_translit_combining.py -u UnicodeData.txt \ |
| 116 |
-o $@ --unicode_version $(UNICODE_VERSION) |
| 117 |
|
| 118 |
translit_compat: UnicodeData.txt |
| 119 |
translit_compat: gen_translit_compat.py |
| 120 |
$(PYTHON3) ./gen_translit_compat.py -u UnicodeData.txt \ |
| 121 |
-o $@ --unicode_version $(UNICODE_VERSION) |
| 122 |
|
| 123 |
translit_circle: UnicodeData.txt |
| 124 |
translit_circle: gen_translit_circle.py |
| 125 |
$(PYTHON3) ./gen_translit_circle.py -u UnicodeData.txt \ |
| 126 |
-o $@ --unicode_version $(UNICODE_VERSION) |
| 127 |
|
| 128 |
translit_cjk_compat: UnicodeData.txt |
| 129 |
translit_cjk_compat: gen_translit_cjk_compat.py |
| 130 |
$(PYTHON3) ./gen_translit_cjk_compat.py -u UnicodeData.txt \ |
| 131 |
-o $@ --unicode_version $(UNICODE_VERSION) |
| 132 |
|
| 133 |
translit_font: UnicodeData.txt |
| 134 |
translit_font: gen_translit_font.py |
| 135 |
$(PYTHON3) ./gen_translit_font.py -u UnicodeData.txt \ |
| 136 |
-o $@ --unicode_version $(UNICODE_VERSION) |
| 137 |
|
| 138 |
translit_fraction: UnicodeData.txt |
| 139 |
translit_fraction: gen_translit_fraction.py |
| 140 |
$(PYTHON3) ./gen_translit_fraction.py -u UnicodeData.txt \ |
| 141 |
-o $@ --unicode_version $(UNICODE_VERSION) |
| 142 |
|
| 143 |
.PHONY: downloads clean-downloads |
| 144 |
downloads: $(DOWNLOADS) $(LICENSE) |
| 145 |
clean-downloads: |
| 146 |
-rm -f $(DOWNLOADS) $(LICENSE) |
| 147 |
|
| 148 |
$(DOWNLOADS): |
| 149 |
$(WGET) http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/$@ |
| 150 |
|
| 151 |
$(LICENSE): |
| 152 |
$(WGET) https://www.unicode.org/license.txt --output-document=$@ |