comparison dep/utf8proc/data/Makefile @ 343:1faa72660932

*: transfer back to cmake from autotools autotools just made lots of things more complicated than they should have and many things broke (i.e. translations)
author Paper <paper@paper.us.eu.org>
date Thu, 20 Jun 2024 05:56:06 -0400
parents
children
comparison
equal deleted inserted replaced
342:adb79bdde329 343:1faa72660932
1 # Unicode data generation rules. Except for the test data files, most
2 # users will not use these Makefile rules, which are primarily to re-generate
3 # unicode_data.c when we get a new Unicode version or charwidth data; they
4 # require ruby and julia to be installed.
5
6 # programs
7 CURL=curl
8 RUBY=ruby
9 PERL=perl
10 MAKE=make
11 JULIA=julia
12 CURLFLAGS = --retry 5 --location
13
14 .PHONY: clean
15
16 .DELETE_ON_ERROR:
17
18 utf8proc_data.c.new: data_generator.rb UnicodeData.txt GraphemeBreakProperty.txt DerivedCoreProperties.txt CompositionExclusions.txt CaseFolding.txt CharWidths.txt emoji-data.txt
19 $(RUBY) data_generator.rb < UnicodeData.txt > $@
20
21 CharWidths.txt: charwidths.jl EastAsianWidth.txt
22 $(JULIA) charwidths.jl > $@
23
24 # Unicode data version (must also update utf8proc_unicode_version function)
25 UNICODE_VERSION=15.1.0
26
27 UnicodeData.txt:
28 $(CURL) $(CURLFLAGS) -o $@ https://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/UnicodeData.txt
29
30 EastAsianWidth.txt:
31 $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/EastAsianWidth.txt
32
33 GraphemeBreakProperty.txt:
34 $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/auxiliary/GraphemeBreakProperty.txt
35
36 DerivedCoreProperties.txt:
37 $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/DerivedCoreProperties.txt
38
39 CompositionExclusions.txt:
40 $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/CompositionExclusions.txt
41
42 CaseFolding.txt:
43 $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/CaseFolding.txt
44
45 NormalizationTest.txt:
46 $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/NormalizationTest.txt
47
48 GraphemeBreakTest.txt:
49 $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/auxiliary/GraphemeBreakTest.txt
50
51 emoji-data.txt:
52 $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://unicode.org/Public/$(UNICODE_VERSION)/ucd/emoji/emoji-data.txt
53
54 Uppercase.txt: DerivedCoreProperties.txt
55 $(RUBY) -e 'puts File.read("DerivedCoreProperties.txt")[/# Derived Property: Uppercase.*?# Total code points:/m]' > $@
56
57 Lowercase.txt: DerivedCoreProperties.txt
58 $(RUBY) -e 'puts File.read("DerivedCoreProperties.txt")[/# Derived Property: Lowercase.*?# Total code points:/m]' > $@
59
60 clean:
61 rm -f UnicodeData.txt EastAsianWidth.txt GraphemeBreakProperty.txt DerivedCoreProperties.txt CompositionExclusions.txt CaseFolding.txt NormalizationTest.txt GraphemeBreakTest.txt CharWidths.txt emoji-data.txt
62 rm -f Uppercase.txt Lowercase.txt
63 rm -f utf8proc_data.c.new