aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-01-07 13:50:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-01-07 13:50:11 +0200
commit76d23e639004517db8f9469d64ac1789f8449365 (patch)
treedbafc8c4e31a97f74046c98af19d0fe76f360001 /build
parentc30caae30bc64974eeaa1e81aa2abdc203f5120d (diff)
Add support for ISO-8859-1 as application encoding
New runtime configuration parameter, XSDE_ENCODING. New option, --char-encoding. New test, tests/cxx/hybrid/iso8859-1.
Diffstat (limited to 'build')
-rw-r--r--build/configuration.make2
-rwxr-xr-xbuild/configure10
-rwxr-xr-xbuild/dist4
-rw-r--r--build/xsde/hybrid/xsd-cxx.make1
-rw-r--r--build/xsde/parser/xsd-cxx.make2
-rw-r--r--build/xsde/serializer/xsd-cxx.make2
6 files changed, 21 insertions, 0 deletions
diff --git a/build/configuration.make b/build/configuration.make
index 05318c9..49624e5 100644
--- a/build/configuration.make
+++ b/build/configuration.make
@@ -10,6 +10,7 @@ $(call include-once,$(scf_root)/configuration-rules.make,$(dcf_root))
#
xsde_arch_width :=
xsde_byteorder :=
+xsde_encoding :=
xsde_stl :=
xsde_stl_iterator :=
xsde_iostream :=
@@ -35,6 +36,7 @@ ifdef xsde_stl
$(out_root)/%: xsde_arch_width := $(xsde_arch_width)
$(out_root)/%: xsde_byteorder := $(xsde_byteorder)
+$(out_root)/%: xsde_encoding := $(xsde_encoding)
$(out_root)/%: xsde_stl := $(xsde_stl)
$(out_root)/%: xsde_stl_iterator := $(xsde_stl_iterator)
$(out_root)/%: xsde_iostream := $(xsde_iostream)
diff --git a/build/configure b/build/configure
index e49a7c5..8295e76 100755
--- a/build/configure
+++ b/build/configure
@@ -39,6 +39,15 @@ else
fi
$echo
+$echo "Please select the application character encoding:"
+$echo
+$echo "(1) UTF-8"
+$echo "(2) ISO-8859-1"
+$echo
+
+encoding=`read_option "utf8 iso8859-1" "utf8"`
+
+$echo
$echo "Would you like the generated code and runtime to use STL?"
$echo
@@ -166,6 +175,7 @@ fi
echo "xsde_arch_width := $arch_width" >$1
echo "xsde_byteorder := $byteorder" >>$1
+echo "xsde_encoding := $encoding" >>$1
echo "xsde_stl := $stl" >>$1
echo "xsde_stl_iterator := $stl_iter" >>$1
echo "xsde_iostream := $iostream" >>$1
diff --git a/build/dist b/build/dist
index eb74acc..cbb9678 100755
--- a/build/dist
+++ b/build/dist
@@ -208,6 +208,8 @@ if [ "$lib" != "" ]; then
gen
fi
+gen 'EXTRA_XSDFLAGS += --char-encoding $(XSDE_ENCODING)'
+gen
gen 'ifeq ($(XSDE_STL),n)'
gen 'EXTRA_XSDFLAGS += --no-stl'
gen 'endif'
@@ -357,6 +359,8 @@ if [ "$lib" != "" ]; then
gen
fi
+gen 'EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --char-encoding $(XSDE_ENCODING)'
+gen
gen '!if "$(XSDE_STL)" == "n"'
gen 'EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-stl'
gen '!endif'
diff --git a/build/xsde/hybrid/xsd-cxx.make b/build/xsde/hybrid/xsd-cxx.make
index c026291..540fa1f 100644
--- a/build/xsde/hybrid/xsd-cxx.make
+++ b/build/xsde/hybrid/xsd-cxx.make
@@ -56,6 +56,7 @@ ops := \
--sskel-file-suffix $(xsd_sskel_suffix) \
--simpl-file-suffix $(xsd_simpl_suffix)
+ops += --char-encoding $(xsde_encoding)
ifeq ($(xsde_stl),n)
ops += --no-stl
diff --git a/build/xsde/parser/xsd-cxx.make b/build/xsde/parser/xsd-cxx.make
index cd657d6..f9c87e9 100644
--- a/build/xsde/parser/xsd-cxx.make
+++ b/build/xsde/parser/xsd-cxx.make
@@ -34,6 +34,8 @@ ifneq ($(xsd_pimpl_suffix),)
ops += --impl-file-suffix $(xsd_pimpl_suffix)
endif
+ops += --char-encoding $(xsde_encoding)
+
ifeq ($(xsde_stl),n)
ops += --no-stl
endif
diff --git a/build/xsde/serializer/xsd-cxx.make b/build/xsde/serializer/xsd-cxx.make
index 2f57782..a042ef9 100644
--- a/build/xsde/serializer/xsd-cxx.make
+++ b/build/xsde/serializer/xsd-cxx.make
@@ -34,6 +34,8 @@ ifneq ($(xsd_pimpl_suffix),)
ops += --impl-file-suffix $(xsd_simpl_suffix)
endif
+ops += --char-encoding $(xsde_encoding)
+
ifeq ($(xsde_stl),n)
ops += --no-stl
endif