explicit Unicode data tables generation

Message ID aeef7c5e-d3d5-6f97-2906-13f7112de081@towo.net
State Accepted
Commit c8d96a96eab0d2354b5c36b394e3fced60216b05
Headers show
Series
  • explicit Unicode data tables generation
Related show

Commit Message

Thomas Wolff March 7, 2018, 11:27 p.m.
This patch adds explicit generation of Unicode data tables for 
libc/string/wcwidth, libc/ctype/tow* and libc/ctype/isw*
according to the explicit approach as requested by Corinna.
Feel free to adjust the make target name (now unidata) as desired.
A note should be added to newlib/README, like this:
The libc functions string/wcwidth, ctype/tow* and ctype/isw* use
character property data tables which are generated from Unicode data.
To regenerate them, especially to update to a new Unicode version,
run ‘make unidata’ in the newlib build target directory. The cygwin
package unicode-ucd should be installed to provide data tables during
this step. Alternatively, run ‘make unidate-download’ to download the
data directly from unicode.org and then generate the tables.
From 7ebd0a0148b81266c945e4f2e36be94ab9395bc7 Mon Sep 17 00:00:00 2001
From: Thomas Wolff <towo@towo.net>
Date: Thu, 8 Mar 2018 00:08:29 +0100
Subject: [PATCH] make target for explicit Unicode data tables generation

Run 'make unidata' in newlib target directory to generate Unicode 
data tables for libc functions wcwidth, tow* and isw*.
---
 newlib/Makefile.am | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Corinna Vinschen March 12, 2018, 1:25 p.m. | #1
On Mar  8 00:27, Thomas Wolff wrote:
> This patch adds explicit generation of Unicode data tables for

> libc/string/wcwidth, libc/ctype/tow* and libc/ctype/isw*

> according to the explicit approach as requested by Corinna.

> Feel free to adjust the make target name (now unidata) as desired.

> A note should be added to newlib/README, like this:

> The libc functions string/wcwidth, ctype/tow* and ctype/isw* use

> character property data tables which are generated from Unicode data.

> To regenerate them, especially to update to a new Unicode version,

> run ‘make unidata’ in the newlib build target directory. The cygwin

> package unicode-ucd should be installed to provide data tables during

> this step. Alternatively, run ‘make unidate-download’ to download the

> data directly from unicode.org and then generate the tables.


Pushed.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Patch

diff --git a/newlib/Makefile.am b/newlib/Makefile.am
index 205705d..809d492 100644
--- a/newlib/Makefile.am
+++ b/newlib/Makefile.am
@@ -382,6 +382,15 @@  endif
 	  done ; \
 	else true; fi
 
+# Generate Unicode data tables for libc/string/wcwidth and libc/ctype/??w*
+unidata:
+	cd $(srcdir)/libc/string; ./mkunidata
+	cd $(srcdir)/libc/ctype; ./mkunidata
+
+unidate-download:
+	cd $(srcdir)/libc/string; ./mkunidata -u
+	cd $(srcdir)/libc/ctype; ./mkunidata -u
+
 # Force makedoc to be built before building info files.
 info-recursive: doc/makedoc
 dvi-recursive: doc/makedoc