Browse Source

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

master
Reece H. Dunn 12 years ago
parent
commit
cc9abdff12
6 changed files with 16 additions and 8 deletions
  1. 1
    0
      .gitignore
  2. 11
    4
      Makefile.am
  3. 1
    1
      src/case.cpp
  4. 1
    1
      src/categories.cpp
  5. 1
    1
      tools/case.py
  6. 1
    1
      tools/categories.py

+ 1
- 0
.gitignore View File

@@ -12,6 +12,7 @@

# build output:

data/
src/libucd.la
tests/printucddata


+ 11
- 4
Makefile.am 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
src/case.cpp 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
src/categories.cpp 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
tools/case.py 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
tools/categories.py 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'):

Loading…
Cancel
Save