Makefile 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. .PHONY : all test testutf8 testclean icutest bench icubench clean distclean
  2. ## Latest greatest version of Unicode
  3. ## May cause confusion if running test suite from these files
  4. ## when the data was generated from a previous version.
  5. #BASE=http://www.unicode.org/Public/UNIDATA
  6. # Explicitly using Unicode 5.1
  7. BASE=http://www.unicode.org/Public/5.1.0/ucd
  8. # Can override to php-cli or php5 or whatevah
  9. PHP=php
  10. #PHP=php-cli
  11. # Some nice tool to grab URLs with
  12. FETCH=wget
  13. #FETCH=fetch
  14. all : UtfNormalData.inc Utf8Case.php
  15. UtfNormalData.inc : UtfNormalGenerate.php UtfNormalUtil.php UnicodeData.txt CompositionExclusions.txt NormalizationCorrections.txt DerivedNormalizationProps.txt
  16. $(PHP) UtfNormalGenerate.php
  17. Utf8Case.php : Utf8CaseGenerate.php UtfNormalUtil.php UnicodeData.txt
  18. $(PHP) Utf8CaseGenerate.php
  19. test : testutf8 testclean UtfNormalTest.php UtfNormalData.inc NormalizationTest.txt
  20. $(PHP) UtfNormalTest.php
  21. testutf8 : Utf8Test.php UTF-8-test.txt
  22. $(PHP) Utf8Test.php
  23. testclean : CleanUpTest.php
  24. $(PHP) CleanUpTest.php
  25. bench : UtfNormalData.inc testdata/washington.txt testdata/berlin.txt testdata/tokyo.txt testdata/young.txt testdata/bulgakov.txt
  26. $(PHP) UtfNormalBench.php
  27. icutest : UtfNormalData.inc NormalizationTest.txt
  28. $(PHP) Utf8Test.php --icu
  29. $(PHP) CleanUpTest.php --icu
  30. $(PHP) UtfNormalTest.php --icu
  31. icubench : UtfNormalData.inc testdata/washington.txt testdata/berlin.txt testdata/tokyo.txt testdata/young.txt testdata/bulgakov.txt
  32. $(PHP) UtfNormalBench.php --icu
  33. clean :
  34. rm -f UtfNormalData.inc UtfNormalDataK.inc
  35. distclean : clean
  36. rm -f CompositionExclusions.txt NormalizationTest.txt NormalizationCorrections.txt UnicodeData.txt DerivedNormalizationProps.txt UTF-8-test.txt
  37. # The Unicode data files...
  38. CompositionExclusions.txt :
  39. $(FETCH) $(BASE)/CompositionExclusions.txt
  40. NormalizationTest.txt :
  41. $(FETCH) $(BASE)/NormalizationTest.txt
  42. NormalizationCorrections.txt :
  43. $(FETCH) $(BASE)/NormalizationCorrections.txt
  44. DerivedNormalizationProps.txt :
  45. $(FETCH) $(BASE)/DerivedNormalizationProps.txt
  46. UnicodeData.txt :
  47. $(FETCH) $(BASE)/UnicodeData.txt
  48. UTF-8-test.txt :
  49. $(FETCH) http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
  50. testdata/berlin.txt :
  51. mkdir -p testdata && wget -U MediaWiki/test -O testdata/berlin.txt "http://de.wikipedia.org/w/index.php?title=Berlin&oldid=2775712&action=raw"
  52. testdata/washington.txt :
  53. mkdir -p testdata && wget -U MediaWiki/test -O testdata/washington.txt "http://en.wikipedia.org/w/index.php?title=Washington%2C_D.C.&oldid=6370218&action=raw"
  54. testdata/tokyo.txt :
  55. mkdir -p testdata && wget -U MediaWiki/test -O testdata/tokyo.txt "http://ja.wikipedia.org/w/index.php?title=%E6%9D%B1%E4%BA%AC%E9%83%BD&oldid=940880&action=raw"
  56. testdata/young.txt :
  57. mkdir -p testdata && wget -U MediaWiki/test -O testdata/young.txt "http://ko.wikipedia.org/w/index.php?title=%EC%9D%B4%EC%88%98%EC%98%81&oldid=627688&action=raw"
  58. testdata/bulgakov.txt :
  59. mkdir -p testdata && wget -U MediaWiki/test -O testdata/bulgakov.txt "http://ru.wikipedia.org/w/index.php?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"