summaryrefslogtreecommitdiff
path: root/libraries/base/cbits/ubconfc
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/base/cbits/ubconfc')
-rwxr-xr-x[-rw-r--r--]libraries/base/cbits/ubconfc20
1 files changed, 20 insertions, 0 deletions
diff --git a/libraries/base/cbits/ubconfc b/libraries/base/cbits/ubconfc
index 4d325866bb..cd29641c58 100644..100755
--- a/libraries/base/cbits/ubconfc
+++ b/libraries/base/cbits/ubconfc
@@ -17,6 +17,26 @@
# Output the file header
+VERSION="$1"
+if [ -z "$VERSION" ]; then
+ echo "Usage: $0 [unicode version]"
+ exit 1
+fi
+
+# This file is #included from GHC.Unicode and is used to define
+# GHC.Unicode.unicodeVersion.
+cat > $(dirname $0)/../include/UnicodeVersion.h <<EOF
+#if 0
+This is an automatically generated file: do not edit
+Generated by `basename $0` at `date`
+@generated
+#endif
+
+#define UNICODE_VERSION_NUMS [$(echo $VERSION | sed 's/\./,/g')]
+EOF
+
+exec > $(dirname $0)/WCsubst.c
+
echo "/*-------------------------------------------------------------------------"
echo "This is an automatically generated file: do not edit"
echo "Generated by `basename $0` at `date`"