Fetch UnicodeData.txt from unicode.org if not present to make the build fully automated.

This commit is contained in:
Reece H. Dunn
2012-12-24 14:47:06 +00:00
parent 8799bc5e53
commit cc9abdff12
6 changed files with 16 additions and 8 deletions
+1
View File
@@ -12,6 +12,7 @@
# build output:
data/
src/libucd.la
tests/printucddata
+11 -4
View File
@@ -54,14 +54,21 @@ EXTRA_DIST += ChangeLog
############################# Unicode Character Database ######################
src/case.cpp: tools/case.py tools/ucd.py
tools/case.py ${UCD_ROOTDIR} > $@
UCD_VERSION=6.2.0
UCD_ROOTDIR=data/ucd
src/categories.cpp: tools/categories.py tools/ucd.py
tools/categories.py ${UCD_ROOTDIR} > $@
data/ucd/UnicodeData.txt:
mkdir -pv data/ucd
wget -O $@ http://www.unicode.org/Public/${UCD_VERSION}/ucd/UnicodeData.txt
############################# libucd ##########################################
src/case.cpp: tools/case.py tools/ucd.py data/ucd/UnicodeData.txt
tools/case.py ${UCD_ROOTDIR} ${UCD_VERSION} > $@
src/categories.cpp: tools/categories.py tools/ucd.py data/ucd/UnicodeData.txt
tools/categories.py ${UCD_ROOTDIR} ${UCD_VERSION} > $@
libucd_includedir = $(includedir)/ucd
libucd_include_HEADERS = \
src/include/ucd/ucd.h
+1 -1
View File
@@ -27,7 +27,7 @@
using namespace ucd;
// Unicode Character Data 6.2
// Unicode Character Data 6.2.0
struct case_conversion_entry
{
+1 -1
View File
@@ -27,7 +27,7 @@
using namespace ucd;
// Unicode Character Data 6.2
// Unicode Character Data 6.2.0
static const uint8_t categories_Cn[256] =
{
+1 -1
View File
@@ -22,7 +22,7 @@ import sys
import ucd
ucd_rootdir = sys.argv[1]
ucd_version = ucd_rootdir.split('-')[-1]
ucd_version = sys.argv[2]
unicode_chars = {}
null = ucd.CodePoint('0000')
+1 -1
View File
@@ -22,7 +22,7 @@ import sys
import ucd
ucd_rootdir = sys.argv[1]
ucd_version = ucd_rootdir.split('-')[-1]
ucd_version = sys.argv[2]
unicode_chars = {}
for data in ucd.parse_ucd_data(ucd_rootdir, 'UnicodeData'):