Support using ICU to do most of the heavy lifting in cleanUp() if the extension is...
[lhc/web/wiklou.git] / includes / normal / Makefile
1 .PHONY : all test testutf8 testclean icutest bench icubench clean distclean
2
3 FETCH=wget
4 #FETCH=fetch
5 BASE=http://www.unicode.org/Public/UNIDATA
6 PHP=php
7 #PHP=php-cli
8
9 all : UtfNormalData.inc
10
11 UtfNormalData.inc : UtfNormalGenerate.php UtfNormalUtil.php UnicodeData.txt CompositionExclusions.txt NormalizationCorrections.txt DerivedNormalizationProps.txt
12 $(PHP) UtfNormalGenerate.php
13
14 test : testutf8 testclean UtfNormalTest.php UtfNormalData.inc NormalizationTest.txt
15 $(PHP) UtfNormalTest.php
16
17 testutf8 : Utf8Test.php UTF-8-test.txt
18 $(PHP) Utf8Test.php
19
20 testclean : CleanUpTest.php
21 $(PHP) CleanUpTest.php
22
23 bench : UtfNormalData.inc testdata/washington.txt testdata/berlin.txt testdata/tokyo.txt testdata/sociology.txt testdata/bulgakov.txt
24 $(PHP) UtfNormalBench.php
25
26 icutest : UtfNormalData.inc NormalizationTest.txt
27 $(PHP) Utf8Test.php --icu
28 $(PHP) CleanUpTest.php --icu
29 $(PHP) UtfNormalTest.php --icu
30
31 icubench : UtfNormalData.inc testdata/washington.txt testdata/berlin.txt testdata/tokyo.txt testdata/sociology.txt testdata/bulgakov.txt
32 $(PHP) UtfNormalBench.php --icu
33
34 clean :
35 rm -f UtfNormalData.inc
36
37 distclean : clean
38 rm -f CompositionExclusions.txt NormalizationTest.txt NormalizationCorrections.txt UnicodeData.txt DerivedNormalizationProps.txt
39
40 # The Unicode data files...
41 CompositionExclusions.txt :
42 $(FETCH) $(BASE)/CompositionExclusions.txt
43
44 NormalizationTest.txt :
45 $(FETCH) $(BASE)/NormalizationTest.txt
46
47 NormalizationCorrections.txt :
48 $(FETCH) $(BASE)/NormalizationCorrections.txt
49
50 DerivedNormalizationProps.txt :
51 $(FETCH) $(BASE)/DerivedNormalizationProps.txt
52
53 UnicodeData.txt :
54 $(FETCH) $(BASE)/UnicodeData.txt
55
56 UTF-8-test.txt :
57 $(FETCH) http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
58
59 testdata/berlin.txt :
60 mkdir -p testdata && wget -U MediaWiki/test -O testdata/berlin.txt "http://de.wikipedia.org/w/wiki.phtml?title=Berlin&oldid=2775712&action=raw"
61
62 testdata/washington.txt :
63 mkdir -p testdata && wget -U MediaWiki/test -O testdata/washington.txt "http://en.wikipedia.org/w/wiki.phtml?title=Washington%2C_DC&oldid=6370218&action=raw"
64
65 testdata/tokyo.txt :
66 mkdir -p testdata && wget -U MediaWiki/test -O testdata/tokyo.txt "http://ja.wikipedia.org/w/wiki.phtml?title=%E6%9D%B1%E4%BA%AC%E9%83%BD&oldid=940880&action=raw"
67
68 testdata/sociology.txt :
69 mkdir -p testdata && wget -U MediaWiki/test -O testdata/sociology.txt "http://ko.wikipedia.org/w/wiki.phtml?title=%EC%82%AC%ED%9A%8C%ED%95%99&oldid=16409&action=raw"
70
71 testdata/bulgakov.txt :
72 mkdir -p testdata && wget -U MediaWiki/test -O testdata/bulgakov.txt "http://ru.wikipedia.org/w/wiki.phtml?title=%D0%91%D1%83%D0%BB%D0%B3%D0%B0%D0%BA%D0%BE%D0%B2%2C_%D0%A1%D0%B5%D1%80%D0%B3%D0%B5%D0%B9_%D0%9D%D0%B8%D0%BA%D0%BE%D0%BB%D0%B0%D0%B5%D0%B2%D0%B8%D1%87&oldid=17704&action=raw"