aboutsummaryrefslogtreecommitdiff
path: root/dist/examples/cxx/hybrid/evolution/ignore
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-10-18 11:17:51 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-10-18 11:17:51 +0200
commitd80d096ee8743fd6f7382d274272b0b6d7faf9bf (patch)
treed0f0bee1e645cb2b86b6837ac0db8a7d2821e533 /dist/examples/cxx/hybrid/evolution/ignore
parent0e4637025fa8d1b4234b0512561d31f0dd023843 (diff)
Support for schema evolution using substitution groups
New examples: hybrid/evolution/ignore and hybrid/evolution/passthrough.
Diffstat (limited to 'dist/examples/cxx/hybrid/evolution/ignore')
-rw-r--r--dist/examples/cxx/hybrid/evolution/ignore/makefile68
-rw-r--r--dist/examples/cxx/hybrid/evolution/ignore/nmakefile66
2 files changed, 134 insertions, 0 deletions
diff --git a/dist/examples/cxx/hybrid/evolution/ignore/makefile b/dist/examples/cxx/hybrid/evolution/ignore/makefile
new file mode 100644
index 0000000..146a31d
--- /dev/null
+++ b/dist/examples/cxx/hybrid/evolution/ignore/makefile
@@ -0,0 +1,68 @@
+root := ../../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS := -I$(root)/libxsde
+
+ifeq ($(XSDE_ENCODING),iso8859-1)
+EXTRA_XSDFLAGS += --char-encoding iso8859-1
+endif
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-parser-val
+endif
+
+ifeq ($(XSDE_SERIALIZER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-serializer-val
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+ifeq ($(XSDE_POLYMORPHIC),y)
+EXTRA_XSDFLAGS += --runtime-polymorphic
+endif
+
+driver: driver.o transform.o transform-pskel.o transform-pimpl.o \
+$(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx transform.hxx transform-pimpl.hxx
+transform.o: transform.cxx transform.hxx
+transform-pskel.o: transform-pskel.cxx
+transform-pimpl.o: transform-pimpl.cxx
+
+.PRECIOUS: %.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx
+
+%.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx: %.xsd
+ $(root)/bin/xsde cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-parser --generate-aggregate --root-element transformations \
+--generate-polymorphic $<
+
+
+# Generate.
+#
+.PHONY: gen
+gen: transform.hxx
+
+
+# Test.
+#
+.PHONY: test
+test: driver transform.xml
+ ./driver transform.xml
+
+# Clean.
+#
+.PHONY: clean cleanobj
+cleanobj:
+ rm -f transform-pimpl.o transform-pskel.o transform.o driver.o driver
+
+clean: cleanobj
+ rm -f transform-pimpl.?xx transform-pskel.?xx transform.?xx
diff --git a/dist/examples/cxx/hybrid/evolution/ignore/nmakefile b/dist/examples/cxx/hybrid/evolution/ignore/nmakefile
new file mode 100644
index 0000000..188fa79
--- /dev/null
+++ b/dist/examples/cxx/hybrid/evolution/ignore/nmakefile
@@ -0,0 +1,66 @@
+root = ..\..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_ENCODING)" == "iso8859-1"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --char-encoding iso8859-1
+!endif
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-parser-val
+!endif
+
+!if "$(XSDE_SERIALIZER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-serializer-val
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+!if "$(XSDE_POLYMORPHIC)" == "y"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic
+!endif
+
+driver.exe: driver.obj transform.obj transform-pskel.obj transform-pimpl.obj \
+$(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx transform.hxx transform-pimpl.hxx
+transform.obj: transform.cxx transform.hxx
+transform-pskel.obj: transform-pskel.cxx
+transform-pimpl.obj: transform-pimpl.cxx
+
+transform.cxx transform.hxx \
+transform-pskel.cxx transform-pskel.hxx transform-pimpl.cxx transform-pimpl.hxx \
+: transform.xsd
+ $(root)\bin\xsde.exe cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-parser --generate-aggregate --root-element transformations \
+--generate-polymorphic transform.xsd
+
+
+# Generate.
+#
+gen: transform.hxx
+
+
+# Test.
+#
+test: driver.exe transform.xml
+ .\driver.exe transform.xml
+
+# Clean.
+#
+cleanobj:
+ -del transform-pimpl.obj transform-pskel.obj transform.obj \
+driver.obj driver.exe
+
+clean: cleanobj
+ -del transform-pimpl.?xx transform-pskel.?xx transform.?xx