summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md17
-rw-r--r--buildfile9
-rw-r--r--libxsd-tests/cxx/parser/expat/basic/driver.cxx4
-rw-r--r--libxsd-tests/cxx/parser/xerces/basic/driver.cxx4
-rw-r--r--libxsd-tests/cxx/tree/basic/driver.cxx4
-rw-r--r--libxsd-tests/manifest6
-rw-r--r--libxsd/manifest6
-rw-r--r--libxsd/xsd/cxx/tree/types.hxx24
-rw-r--r--libxsd/xsd/cxx/xml/dom/serialization-header.txx4
-rw-r--r--repositories.manifest4
-rw-r--r--xsd-examples/manifest6
-rw-r--r--xsd-tests/clash/driver.cxx3
-rw-r--r--xsd-tests/code/name-conflict/driver.cxx3
-rw-r--r--xsd-tests/code/name-escaping/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/built-in/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/enumeration/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/list/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/name-clash/inheritance/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/polymorphism/recursive/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx3
-rw-r--r--xsd-tests/cxx/parser/polymorphism/same-type/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/recursive/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/test-template/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/union/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/validation/all/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/validation/any/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/attribute/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/any-type/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/binary/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/boolean/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/byte/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/date-time/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/float/driver.cxx4
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/int/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/integer/driver.cxx4
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/long/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/qname/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/short/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/string/driver.cxx4
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/uri/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/choice/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/validation/restriction/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/validation/sequence/driver.cxx5
-rw-r--r--xsd-tests/cxx/tree/any-type/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/binary/cdr/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/binary/polymorphic/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/binary/xdr-ordered/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/binary/xdr/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/built-in/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/chameleon/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/comparison/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/compilation/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/complex/ctor/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/containment/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/default/general/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/default/omit/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/detach/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/dom-association/dom-parse.cxx3
-rw-r--r--xsd-tests/cxx/tree/dom-association/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/encoding/char/lcp/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/encoding/char/utf-8/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/encoding/wchar/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/enumeration/ctor/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/enumeration/inheritance/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/float/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/list/ctor/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/name-clash/inheritance/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/naming/camel/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/naming/java/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/naming/knr/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/order/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/polymorphism/comparison/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/polymorphism/ostream/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/polymorphism/same-type/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/prefix/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/test-template/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/types-only/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/union/ctor/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/wildcard/driver.cxx3
-rw-r--r--xsd-tests/failed/driver.cxx3
-rw-r--r--xsd-tests/manifest6
-rw-r--r--xsd-tests/morphing/anonymous/attribute-group/driver.cxx3
-rw-r--r--xsd-tests/morphing/anonymous/basic/driver.cxx3
-rw-r--r--xsd-tests/morphing/anonymous/cyclic-inclusion/driver.cxx3
-rw-r--r--xsd-tests/morphing/anonymous/group/driver.cxx3
-rw-r--r--xsd-tests/processing/inheritance/driver.cxx.in3
-rw-r--r--xsd-tests/schema/anonymous/driver.cxx3
-rw-r--r--xsd-tests/schema/any-type/driver.cxx3
-rw-r--r--xsd-tests/schema/any/driver.cxx.in3
-rw-r--r--xsd-tests/schema/attribute-group/driver.cxx3
-rw-r--r--xsd-tests/schema/attribute/driver.cxx3
-rw-r--r--xsd-tests/schema/cardinality/driver.cxx3
-rw-r--r--xsd-tests/schema/chameleon/driver.cxx3
-rw-r--r--xsd-tests/schema/enumeration/driver.cxx3
-rw-r--r--xsd-tests/schema/forward/driver.cxx3
-rw-r--r--xsd-tests/schema/group/driver.cxx3
-rw-r--r--xsd-tests/schema/import/driver.cxx3
-rw-r--r--xsd-tests/schema/include/driver.cxx3
-rw-r--r--xsd-tests/schema/no-namespace/driver.cxx3
-rw-r--r--xsd-tests/schema/recursive/driver.cxx3
-rw-r--r--xsd-tests/schema/ref-type/valid/driver.cxx.in3
-rw-r--r--xsd-tests/schema/restriction/driver.cxx3
-rw-r--r--xsd-tests/schema/union/driver.cxx3
-rw-r--r--xsd/README2
-rw-r--r--xsd/build/root.build13
-rw-r--r--xsd/doc/buildfile235
-rw-r--r--xsd/manifest11
-rw-r--r--xsd/xsd/buildfile86
109 files changed, 534 insertions, 220 deletions
diff --git a/README.md b/README.md
index c856fee..a58d2fc 100644
--- a/README.md
+++ b/README.md
@@ -17,3 +17,20 @@ bdep init @host -d xsd
bdep init @target -d libxsd -d libxsd-tests -d xsd-tests -d xsd-examples
```
+
+To generate the documentation in the `.ps` and `.pdf` formats, `html2ps` and
+`ps2pdf14` programs are required (the latter is from `ghostscript`). A warning
+is issued in the development mode if these programs are not available.
+
+To test installation of the XSD compiler, create a separate target
+configuration (it will automatically resolve any build-time dependencies from
+`host`):
+
+```
+bdep config create @install ../xsd-install --type target cc config.cxx=g++ \
+ config.install.root=/tmp/install
+
+bdep init @install -d xsd
+
+b install: ../xsd-install/xsd/
+```
diff --git a/buildfile b/buildfile
index 856a678..c3c8909 100644
--- a/buildfile
+++ b/buildfile
@@ -1,7 +1,6 @@
-# file : buildfile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+# Glue buildfile that "pulls" all the packages in the project.
+#
+import pkgs = [dir_paths] $process.run_regex(\
+ cat $src_root/packages.manifest, '\s*location\s*:\s*(\S+)\s*', '\1')
-# Glue buildfile that "pulls" all the packages.
-
-import pkgs = */
./: $pkgs
diff --git a/libxsd-tests/cxx/parser/expat/basic/driver.cxx b/libxsd-tests/cxx/parser/expat/basic/driver.cxx
index f601e7a..5c0325a 100644
--- a/libxsd-tests/cxx/parser/expat/basic/driver.cxx
+++ b/libxsd-tests/cxx/parser/expat/basic/driver.cxx
@@ -1,7 +1,6 @@
// file : cxx/parser/expat/basic/driver.cxx
// copyright : GNU GPL v2 + exceptions; see accompanying LICENSE file
-#include <cassert>
#include <iostream>
// Define XSD_CXX11 since we include libxsd headers directly.
@@ -25,6 +24,9 @@
#include <xsd/cxx/parser/non-validating/xml-schema-pskel.hxx>
#include <xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace xsd::cxx;
diff --git a/libxsd-tests/cxx/parser/xerces/basic/driver.cxx b/libxsd-tests/cxx/parser/xerces/basic/driver.cxx
index b7dfd1d..f578a6a 100644
--- a/libxsd-tests/cxx/parser/xerces/basic/driver.cxx
+++ b/libxsd-tests/cxx/parser/xerces/basic/driver.cxx
@@ -1,7 +1,6 @@
// file : cxx/parser/xerces/basic/driver.cxx
// copyright : GNU GPL v2 + exceptions; see accompanying LICENSE file
-#include <cassert>
#include <iostream>
// Define XSD_CXX11 since we include libxsd headers directly.
@@ -25,6 +24,9 @@
#include <xsd/cxx/parser/non-validating/xml-schema-pskel.hxx>
#include <xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace xsd::cxx;
diff --git a/libxsd-tests/cxx/tree/basic/driver.cxx b/libxsd-tests/cxx/tree/basic/driver.cxx
index d36d31e..115bb6a 100644
--- a/libxsd-tests/cxx/tree/basic/driver.cxx
+++ b/libxsd-tests/cxx/tree/basic/driver.cxx
@@ -1,7 +1,6 @@
// file : cxx/tree/basic/driver.cxx
// copyright : GNU GPL v2 + exceptions; see accompanying LICENSE file
-#include <cassert>
#include <iostream>
#include <xercesc/dom/DOMText.hpp>
@@ -32,6 +31,9 @@
#include <xsd/cxx/tree/exceptions.hxx> // parsing
#include <xsd/cxx/tree/error-handler.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace xsd::cxx;
diff --git a/libxsd-tests/manifest b/libxsd-tests/manifest
index 0648894..ca2fd01 100644
--- a/libxsd-tests/manifest
+++ b/libxsd-tests/manifest
@@ -1,6 +1,6 @@
: 1
name: libxsd-tests
-version: 4.2.0-b.1.z
+version: 4.2.0-b.2.z
project: xsd
summary: XML Schema to C++ data binding compiler runtime library tests
license: other: GPL-2.0-only with Xerces-C++ linking exception and FLOSS exception
@@ -9,7 +9,7 @@ url: https://www.codesynthesis.com/projects/xsd/
doc-url: https://www.codesynthesis.com/projects/xsd/
src-url: https://git.codesynthesis.com/cgit/xsd/xsd/tree/libxsd-tests/
email: xsd-users@codesynthesis.com ; Mailing list
-depends: * build2 >= 0.14.0-
-depends: * bpkg >= 0.14.0-
+depends: * build2 >= 0.14.0
+depends: * bpkg >= 0.14.0
depends: libxerces-c ^3.0.0
depends: libexpat ^2.1.0
diff --git a/libxsd/manifest b/libxsd/manifest
index 43c40f6..e5d4ad4 100644
--- a/libxsd/manifest
+++ b/libxsd/manifest
@@ -1,6 +1,6 @@
: 1
name: libxsd
-version: 4.2.0-b.1.z
+version: 4.2.0-b.2.z
project: xsd
summary: XML Schema to C++ data binding compiler runtime library
license: other: GPL-2.0-only with Xerces-C++ linking exception and FLOSS exception
@@ -12,6 +12,6 @@ doc-url: https://www.codesynthesis.com/projects/xsd/
src-url: https://git.codesynthesis.com/cgit/xsd/xsd/tree/libxsd/
email: xsd-users@codesynthesis.com ; Mailing list
build-warning-email: builds@codesynthesis.com
-depends: * build2 >= 0.14.0-
-depends: * bpkg >= 0.14.0-
+depends: * build2 >= 0.14.0
+depends: * bpkg >= 0.14.0
tests: libxsd-tests == $
diff --git a/libxsd/xsd/cxx/tree/types.hxx b/libxsd/xsd/cxx/tree/types.hxx
index 30b2209..0790997 100644
--- a/libxsd/xsd/cxx/tree/types.hxx
+++ b/libxsd/xsd/cxx/tree/types.hxx
@@ -268,6 +268,18 @@ namespace xsd
base () = x;
return *this;
}
+
+ public:
+ /**
+ * @brief Explicitly "cast" to the base string type.
+ *
+ * @return A const reference to the instance as the base string type.
+ */
+ const std::basic_string<C>&
+ base_string () const
+ {
+ return *this;
+ }
};
/**
@@ -2877,6 +2889,18 @@ namespace xsd
return *this;
}
+ public:
+ /**
+ * @brief Explicitly "cast" to the base string type.
+ *
+ * @return A const reference to the instance as the base string type.
+ */
+ const std::basic_string<C>&
+ base_string () const
+ {
+ return *this;
+ }
+
protected:
//@cond
diff --git a/libxsd/xsd/cxx/xml/dom/serialization-header.txx b/libxsd/xsd/cxx/xml/dom/serialization-header.txx
index 997dfe9..4b9ebdd 100644
--- a/libxsd/xsd/cxx/xml/dom/serialization-header.txx
+++ b/libxsd/xsd/cxx/xml/dom/serialization-header.txx
@@ -174,7 +174,9 @@ namespace xsd
atts.push_back (a);
}
- for (std::vector<DOMAttr*>::iterator i (atts.begin ()),
+ // Qualify DOMAttr to work around MSVC 16.11 /std:c++20 issue.
+ //
+ for (std::vector<xercesc::DOMAttr*>::iterator i (atts.begin ()),
end (atts.end ()); i != end; ++i)
{
e.removeAttributeNode (*i);
diff --git a/repositories.manifest b/repositories.manifest
index 5dd16c3..0a75293 100644
--- a/repositories.manifest
+++ b/repositories.manifest
@@ -20,3 +20,7 @@ location: https://git.codesynthesis.com/libcutl/libcutl.git##HEAD
:
role: prerequisite
location: https://git.codesynthesis.com/libxsd-frontend/libxsd-frontend.git##HEAD
+
+:
+role: prerequisite
+location: https://git.codesynthesis.com/cli/cli.git##HEAD
diff --git a/xsd-examples/manifest b/xsd-examples/manifest
index 7bcd986..fc949c2 100644
--- a/xsd-examples/manifest
+++ b/xsd-examples/manifest
@@ -1,6 +1,6 @@
: 1
name: xsd-examples
-version: 4.2.0-b.1.z
+version: 4.2.0-b.2.z
project: xsd
summary: XML Schema to C++ data binding compiler examples
license: Unlicence
@@ -9,8 +9,8 @@ url: https://www.codesynthesis.com/projects/xsd/
doc-url: https://www.codesynthesis.com/projects/xsd/
src-url: https://git.codesynthesis.com/cgit/xsd/xsd/tree/xsd-examples/
email: xsd-users@codesynthesis.com ; Mailing list
-depends: * build2 >= 0.14.0-
-depends: * bpkg >= 0.14.0-
+depends: * build2 >= 0.14.0
+depends: * bpkg >= 0.14.0
depends: libxsd == $
depends: libxerces-c ^3.0.0
depends: libexpat ^2.1.0
diff --git a/xsd-tests/clash/driver.cxx b/xsd-tests/clash/driver.cxx
index 478e71a..c8fd0ed 100644
--- a/xsd-tests/clash/driver.cxx
+++ b/xsd-tests/clash/driver.cxx
@@ -4,6 +4,9 @@
#include "foo.hxx"
#include "clash.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/code/name-conflict/driver.cxx b/xsd-tests/code/name-conflict/driver.cxx
index a6eb4fe..55763df 100644
--- a/xsd-tests/code/name-conflict/driver.cxx
+++ b/xsd-tests/code/name-conflict/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/code/name-escaping/driver.cxx b/xsd-tests/code/name-escaping/driver.cxx
index 8d74030..dcfb967 100644
--- a/xsd-tests/code/name-escaping/driver.cxx
+++ b/xsd-tests/code/name-escaping/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/cxx/parser/built-in/driver.cxx b/xsd-tests/cxx/parser/built-in/driver.cxx
index 008bc2d..aab2f19 100644
--- a/xsd-tests/cxx/parser/built-in/driver.cxx
+++ b/xsd-tests/cxx/parser/built-in/driver.cxx
@@ -9,6 +9,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using xml_schema::ro_string;
diff --git a/xsd-tests/cxx/parser/enumeration/driver.cxx b/xsd-tests/cxx/parser/enumeration/driver.cxx
index 4776ee2..d5488f7 100644
--- a/xsd-tests/cxx/parser/enumeration/driver.cxx
+++ b/xsd-tests/cxx/parser/enumeration/driver.cxx
@@ -9,6 +9,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace xml_schema;
diff --git a/xsd-tests/cxx/parser/list/driver.cxx b/xsd-tests/cxx/parser/list/driver.cxx
index 382da5b..42d3255 100644
--- a/xsd-tests/cxx/parser/list/driver.cxx
+++ b/xsd-tests/cxx/parser/list/driver.cxx
@@ -9,6 +9,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/parser/name-clash/inheritance/driver.cxx b/xsd-tests/cxx/parser/name-clash/inheritance/driver.cxx
index 9e9b905..cdb2b22 100644
--- a/xsd-tests/cxx/parser/name-clash/inheritance/driver.cxx
+++ b/xsd-tests/cxx/parser/name-clash/inheritance/driver.cxx
@@ -9,6 +9,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/parser/polymorphism/recursive/driver.cxx b/xsd-tests/cxx/parser/polymorphism/recursive/driver.cxx
index 26793a0..4e7ffde 100644
--- a/xsd-tests/cxx/parser/polymorphism/recursive/driver.cxx
+++ b/xsd-tests/cxx/parser/polymorphism/recursive/driver.cxx
@@ -10,6 +10,9 @@
#include "test-pskel.hxx"
#include "test-pimpl.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx b/xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx
index 7c7f410..ba44859 100644
--- a/xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx
+++ b/xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx
@@ -5,6 +5,9 @@
#include "test-pimpl.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
namespace test
diff --git a/xsd-tests/cxx/parser/polymorphism/same-type/driver.cxx b/xsd-tests/cxx/parser/polymorphism/same-type/driver.cxx
index 6da4a0a..cf0180b 100644
--- a/xsd-tests/cxx/parser/polymorphism/same-type/driver.cxx
+++ b/xsd-tests/cxx/parser/polymorphism/same-type/driver.cxx
@@ -9,6 +9,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/parser/recursive/driver.cxx b/xsd-tests/cxx/parser/recursive/driver.cxx
index c93fd35..0877dfc 100644
--- a/xsd-tests/cxx/parser/recursive/driver.cxx
+++ b/xsd-tests/cxx/parser/recursive/driver.cxx
@@ -9,6 +9,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
struct sub_pimpl: sub_type_pskel
diff --git a/xsd-tests/cxx/parser/test-template/driver.cxx b/xsd-tests/cxx/parser/test-template/driver.cxx
index 333c6fd..74c8c99 100644
--- a/xsd-tests/cxx/parser/test-template/driver.cxx
+++ b/xsd-tests/cxx/parser/test-template/driver.cxx
@@ -9,6 +9,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/parser/union/driver.cxx b/xsd-tests/cxx/parser/union/driver.cxx
index c5b5c71..d133b41 100644
--- a/xsd-tests/cxx/parser/union/driver.cxx
+++ b/xsd-tests/cxx/parser/union/driver.cxx
@@ -9,6 +9,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/parser/validation/all/driver.cxx b/xsd-tests/cxx/parser/validation/all/driver.cxx
index a8cbcca..31081cb 100644
--- a/xsd-tests/cxx/parser/validation/all/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/all/driver.cxx
@@ -10,6 +10,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/parser/validation/any/driver.cxx b/xsd-tests/cxx/parser/validation/any/driver.cxx
index 1eceda6..2f22d37 100644
--- a/xsd-tests/cxx/parser/validation/any/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/any/driver.cxx
@@ -10,6 +10,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using xml_schema::ro_string;
@@ -35,7 +38,7 @@ struct any_a_pimpl: any_a_pskel
}
virtual void
- _start_any_element (ro_string const&,
+ _start_any_element (ro_string const&,
ro_string const& n,
ro_string const*)
{
diff --git a/xsd-tests/cxx/parser/validation/attribute/driver.cxx b/xsd-tests/cxx/parser/validation/attribute/driver.cxx
index 4710564..a98796e 100644
--- a/xsd-tests/cxx/parser/validation/attribute/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/attribute/driver.cxx
@@ -10,6 +10,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using xml_schema::ro_string;
diff --git a/xsd-tests/cxx/parser/validation/built-in/any-type/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/any-type/driver.cxx
index cbeb864..35b3927 100644
--- a/xsd-tests/cxx/parser/validation/built-in/any-type/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/any-type/driver.cxx
@@ -10,6 +10,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using xml_schema::ro_string;
@@ -23,7 +26,7 @@ struct any_type_pimpl: xml_schema::any_type_pimpl
}
virtual void
- _start_any_element (ro_string const&,
+ _start_any_element (ro_string const&,
ro_string const& n,
ro_string const*)
{
diff --git a/xsd-tests/cxx/parser/validation/built-in/binary/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/binary/driver.cxx
index 3fe20ec..b3f0dbf 100644
--- a/xsd-tests/cxx/parser/validation/built-in/binary/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/binary/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in base64Binary and hexBinary types validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
template <typename T>
diff --git a/xsd-tests/cxx/parser/validation/built-in/boolean/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/boolean/driver.cxx
index f1499cd..3b25ffe 100644
--- a/xsd-tests/cxx/parser/validation/built-in/boolean/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/boolean/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in boolean type validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
bool
diff --git a/xsd-tests/cxx/parser/validation/built-in/byte/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/byte/driver.cxx
index b533cfd..9b0e9a1 100644
--- a/xsd-tests/cxx/parser/validation/built-in/byte/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/byte/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in byte and unsigned byte types validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
template <typename T>
diff --git a/xsd-tests/cxx/parser/validation/built-in/date-time/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/date-time/driver.cxx
index da02a50..36f384f 100644
--- a/xsd-tests/cxx/parser/validation/built-in/date-time/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/date-time/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in date and time types validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
template <typename T>
diff --git a/xsd-tests/cxx/parser/validation/built-in/float/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/float/driver.cxx
index e92c419..87a744d 100644
--- a/xsd-tests/cxx/parser/validation/built-in/float/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/float/driver.cxx
@@ -4,11 +4,13 @@
// Test the built-in float, double, and decimal types validation.
//
#include <math.h>
-#include <cassert>
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
template <typename T>
diff --git a/xsd-tests/cxx/parser/validation/built-in/int/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/int/driver.cxx
index 270cd0e..7e68b35 100644
--- a/xsd-tests/cxx/parser/validation/built-in/int/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/int/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in int and unsigned int types validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
template <typename T>
diff --git a/xsd-tests/cxx/parser/validation/built-in/integer/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/integer/driver.cxx
index 3a5fdd5..4f8a80c 100644
--- a/xsd-tests/cxx/parser/validation/built-in/integer/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/integer/driver.cxx
@@ -7,11 +7,13 @@
#include <string>
#include <sstream>
-#include <cassert>
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace xsd::cxx::parser::validating;
diff --git a/xsd-tests/cxx/parser/validation/built-in/long/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/long/driver.cxx
index a4ab565..41feb0b 100644
--- a/xsd-tests/cxx/parser/validation/built-in/long/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/long/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in long and unsigned long types validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
template <typename T>
diff --git a/xsd-tests/cxx/parser/validation/built-in/qname/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/qname/driver.cxx
index 85acd1c..8845b38 100644
--- a/xsd-tests/cxx/parser/validation/built-in/qname/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/qname/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in QName type validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
bool
diff --git a/xsd-tests/cxx/parser/validation/built-in/short/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/short/driver.cxx
index 7c79b22..f09f975 100644
--- a/xsd-tests/cxx/parser/validation/built-in/short/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/short/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in short and unsigned short types validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
template <typename T>
diff --git a/xsd-tests/cxx/parser/validation/built-in/string/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/string/driver.cxx
index 920385a..d74ee52 100644
--- a/xsd-tests/cxx/parser/validation/built-in/string/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/string/driver.cxx
@@ -4,11 +4,13 @@
// Test the built-in string & friends types validation.
//
#include <string>
-#include <cassert>
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
template <typename T>
diff --git a/xsd-tests/cxx/parser/validation/built-in/uri/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/uri/driver.cxx
index dcc9242..c296858 100644
--- a/xsd-tests/cxx/parser/validation/built-in/uri/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/uri/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in anyURI type validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
int
diff --git a/xsd-tests/cxx/parser/validation/choice/driver.cxx b/xsd-tests/cxx/parser/validation/choice/driver.cxx
index 4a52c5d..edfb15d 100644
--- a/xsd-tests/cxx/parser/validation/choice/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/choice/driver.cxx
@@ -10,6 +10,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using xml_schema::ro_string;
diff --git a/xsd-tests/cxx/parser/validation/restriction/driver.cxx b/xsd-tests/cxx/parser/validation/restriction/driver.cxx
index 206b9f8..ea7f192 100644
--- a/xsd-tests/cxx/parser/validation/restriction/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/restriction/driver.cxx
@@ -10,6 +10,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/parser/validation/sequence/driver.cxx b/xsd-tests/cxx/parser/validation/sequence/driver.cxx
index 6b5bf70..07d33e2 100644
--- a/xsd-tests/cxx/parser/validation/sequence/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/sequence/driver.cxx
@@ -10,6 +10,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using xml_schema::ro_string;
@@ -59,7 +62,7 @@ struct sequence_pimpl: sequence_pskel
}
virtual void
- _start_any_element (ro_string const& ns,
+ _start_any_element (ro_string const& ns,
ro_string const& name,
ro_string const*)
{
diff --git a/xsd-tests/cxx/tree/any-type/driver.cxx b/xsd-tests/cxx/tree/any-type/driver.cxx
index a8fccf6..8ed00c7 100644
--- a/xsd-tests/cxx/tree/any-type/driver.cxx
+++ b/xsd-tests/cxx/tree/any-type/driver.cxx
@@ -16,6 +16,9 @@
#include <xsd/cxx/xml/string.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using namespace xercesc;
diff --git a/xsd-tests/cxx/tree/binary/cdr/driver.cxx b/xsd-tests/cxx/tree/binary/cdr/driver.cxx
index fe74bb5..4656b03 100644
--- a/xsd-tests/cxx/tree/binary/cdr/driver.cxx
+++ b/xsd-tests/cxx/tree/binary/cdr/driver.cxx
@@ -5,11 +5,13 @@
//
#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
#include <iostream>
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/binary/polymorphic/driver.cxx b/xsd-tests/cxx/tree/binary/polymorphic/driver.cxx
index 15ebf17..ebc0dba 100644
--- a/xsd-tests/cxx/tree/binary/polymorphic/driver.cxx
+++ b/xsd-tests/cxx/tree/binary/polymorphic/driver.cxx
@@ -5,7 +5,6 @@
//
#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
#include <iostream>
#include <typeinfo>
@@ -13,6 +12,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/binary/xdr-ordered/driver.cxx b/xsd-tests/cxx/tree/binary/xdr-ordered/driver.cxx
index d61a645..46a2e1f 100644
--- a/xsd-tests/cxx/tree/binary/xdr-ordered/driver.cxx
+++ b/xsd-tests/cxx/tree/binary/xdr-ordered/driver.cxx
@@ -8,11 +8,13 @@
#include <memory> // std::auto_ptr/unique_ptr
#include <cstring> // std::memcpy
-#include <cassert>
#include <iostream>
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/binary/xdr/driver.cxx b/xsd-tests/cxx/tree/binary/xdr/driver.cxx
index 04606ea..a497d73 100644
--- a/xsd-tests/cxx/tree/binary/xdr/driver.cxx
+++ b/xsd-tests/cxx/tree/binary/xdr/driver.cxx
@@ -6,11 +6,13 @@
#include <memory> // std::auto_ptr/unique_ptr
#include <cstring> // std::memcpy
-#include <cassert>
#include <iostream>
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/built-in/driver.cxx b/xsd-tests/cxx/tree/built-in/driver.cxx
index 4141290..ccb43ac 100644
--- a/xsd-tests/cxx/tree/built-in/driver.cxx
+++ b/xsd-tests/cxx/tree/built-in/driver.cxx
@@ -8,9 +8,11 @@
#include <sstream>
#include <iostream>
-
#include "types.hxx"
+#undef NDEBUG
+#include <cassert>
+
using std::cerr;
using std::endl;
diff --git a/xsd-tests/cxx/tree/chameleon/driver.cxx b/xsd-tests/cxx/tree/chameleon/driver.cxx
index c22ca55..0d95864 100644
--- a/xsd-tests/cxx/tree/chameleon/driver.cxx
+++ b/xsd-tests/cxx/tree/chameleon/driver.cxx
@@ -9,6 +9,9 @@
#include "includer.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/comparison/driver.cxx b/xsd-tests/cxx/tree/comparison/driver.cxx
index aa7b66d..36b0647 100644
--- a/xsd-tests/cxx/tree/comparison/driver.cxx
+++ b/xsd-tests/cxx/tree/comparison/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/compilation/driver.cxx b/xsd-tests/cxx/tree/compilation/driver.cxx
index 5c5ab39..818cb6b 100644
--- a/xsd-tests/cxx/tree/compilation/driver.cxx
+++ b/xsd-tests/cxx/tree/compilation/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/complex/ctor/driver.cxx b/xsd-tests/cxx/tree/complex/ctor/driver.cxx
index 7beaa93..7cc25bb 100644
--- a/xsd-tests/cxx/tree/complex/ctor/driver.cxx
+++ b/xsd-tests/cxx/tree/complex/ctor/driver.cxx
@@ -4,7 +4,6 @@
// Test generation of varous complex type constructors.
//
-#include <cassert>
#include <memory>
#include "test.hxx"
@@ -16,6 +15,9 @@
# define XSD_MOVE(x) x
#endif
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/containment/driver.cxx b/xsd-tests/cxx/tree/containment/driver.cxx
index 65c17fc..db8db72 100644
--- a/xsd-tests/cxx/tree/containment/driver.cxx
+++ b/xsd-tests/cxx/tree/containment/driver.cxx
@@ -5,7 +5,6 @@
//
#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
#include "test.hxx"
@@ -16,6 +15,9 @@
# define XSD_MOVE(x) x
#endif
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/default/general/driver.cxx b/xsd-tests/cxx/tree/default/general/driver.cxx
index 7031636..f15a0c7 100644
--- a/xsd-tests/cxx/tree/default/general/driver.cxx
+++ b/xsd-tests/cxx/tree/default/general/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/default/omit/driver.cxx b/xsd-tests/cxx/tree/default/omit/driver.cxx
index 3dcc0d8..c7d32c9 100644
--- a/xsd-tests/cxx/tree/default/omit/driver.cxx
+++ b/xsd-tests/cxx/tree/default/omit/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/detach/driver.cxx b/xsd-tests/cxx/tree/detach/driver.cxx
index b632b5d..1d7e1f9 100644
--- a/xsd-tests/cxx/tree/detach/driver.cxx
+++ b/xsd-tests/cxx/tree/detach/driver.cxx
@@ -5,7 +5,6 @@
//
#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
#include "test.hxx"
@@ -16,6 +15,9 @@
# define XSD_MOVE(x) x
#endif
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/dom-association/dom-parse.cxx b/xsd-tests/cxx/tree/dom-association/dom-parse.cxx
index 281eb2c..a14b8e9 100644
--- a/xsd-tests/cxx/tree/dom-association/dom-parse.cxx
+++ b/xsd-tests/cxx/tree/dom-association/dom-parse.cxx
@@ -15,6 +15,9 @@
#include <xsd/cxx/tree/exceptions.hxx>
#include <xsd/cxx/tree/error-handler.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xercesc;
namespace xml = xsd::cxx::xml;
namespace tree = xsd::cxx::tree;
diff --git a/xsd-tests/cxx/tree/dom-association/driver.cxx b/xsd-tests/cxx/tree/dom-association/driver.cxx
index d85e105..2470212 100644
--- a/xsd-tests/cxx/tree/dom-association/driver.cxx
+++ b/xsd-tests/cxx/tree/dom-association/driver.cxx
@@ -13,6 +13,9 @@
#include "dom-parse.hxx"
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using namespace xercesc;
diff --git a/xsd-tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx b/xsd-tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
index e356815..9d92c12 100644
--- a/xsd-tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
+++ b/xsd-tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
@@ -10,6 +10,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/encoding/char/lcp/driver.cxx b/xsd-tests/cxx/tree/encoding/char/lcp/driver.cxx
index 97c0875..54f99e6 100644
--- a/xsd-tests/cxx/tree/encoding/char/lcp/driver.cxx
+++ b/xsd-tests/cxx/tree/encoding/char/lcp/driver.cxx
@@ -11,6 +11,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/encoding/char/utf-8/driver.cxx b/xsd-tests/cxx/tree/encoding/char/utf-8/driver.cxx
index 7892667..7f83d2b 100644
--- a/xsd-tests/cxx/tree/encoding/char/utf-8/driver.cxx
+++ b/xsd-tests/cxx/tree/encoding/char/utf-8/driver.cxx
@@ -10,6 +10,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/encoding/wchar/driver.cxx b/xsd-tests/cxx/tree/encoding/wchar/driver.cxx
index dbcbcba..f4e7993 100644
--- a/xsd-tests/cxx/tree/encoding/wchar/driver.cxx
+++ b/xsd-tests/cxx/tree/encoding/wchar/driver.cxx
@@ -10,6 +10,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/enumeration/ctor/driver.cxx b/xsd-tests/cxx/tree/enumeration/ctor/driver.cxx
index c5ea1f2..3ea4a28 100644
--- a/xsd-tests/cxx/tree/enumeration/ctor/driver.cxx
+++ b/xsd-tests/cxx/tree/enumeration/ctor/driver.cxx
@@ -7,6 +7,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/enumeration/inheritance/driver.cxx b/xsd-tests/cxx/tree/enumeration/inheritance/driver.cxx
index b517b1f..d2494c0 100644
--- a/xsd-tests/cxx/tree/enumeration/inheritance/driver.cxx
+++ b/xsd-tests/cxx/tree/enumeration/inheritance/driver.cxx
@@ -5,11 +5,13 @@
//
#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
#include <iostream>
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/float/driver.cxx b/xsd-tests/cxx/tree/float/driver.cxx
index 0f7455f..b4409ad 100644
--- a/xsd-tests/cxx/tree/float/driver.cxx
+++ b/xsd-tests/cxx/tree/float/driver.cxx
@@ -10,6 +10,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/list/ctor/driver.cxx b/xsd-tests/cxx/tree/list/ctor/driver.cxx
index 5673e67..f821cdd 100644
--- a/xsd-tests/cxx/tree/list/ctor/driver.cxx
+++ b/xsd-tests/cxx/tree/list/ctor/driver.cxx
@@ -7,6 +7,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/name-clash/inheritance/driver.cxx b/xsd-tests/cxx/tree/name-clash/inheritance/driver.cxx
index 634c56a..ae0d337 100644
--- a/xsd-tests/cxx/tree/name-clash/inheritance/driver.cxx
+++ b/xsd-tests/cxx/tree/name-clash/inheritance/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/naming/camel/driver.cxx b/xsd-tests/cxx/tree/naming/camel/driver.cxx
index 600b3ff..82dddba 100644
--- a/xsd-tests/cxx/tree/naming/camel/driver.cxx
+++ b/xsd-tests/cxx/tree/naming/camel/driver.cxx
@@ -11,6 +11,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/naming/java/driver.cxx b/xsd-tests/cxx/tree/naming/java/driver.cxx
index b47ff74..4738296 100644
--- a/xsd-tests/cxx/tree/naming/java/driver.cxx
+++ b/xsd-tests/cxx/tree/naming/java/driver.cxx
@@ -11,6 +11,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/naming/knr/driver.cxx b/xsd-tests/cxx/tree/naming/knr/driver.cxx
index 8c75dd9..f959a20 100644
--- a/xsd-tests/cxx/tree/naming/knr/driver.cxx
+++ b/xsd-tests/cxx/tree/naming/knr/driver.cxx
@@ -11,6 +11,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/order/driver.cxx b/xsd-tests/cxx/tree/order/driver.cxx
index f1902ba..46a0065 100644
--- a/xsd-tests/cxx/tree/order/driver.cxx
+++ b/xsd-tests/cxx/tree/order/driver.cxx
@@ -5,7 +5,6 @@
//
#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
#include <iostream>
#include <xercesc/dom/DOM.hpp>
@@ -13,6 +12,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using namespace xercesc;
diff --git a/xsd-tests/cxx/tree/polymorphism/comparison/driver.cxx b/xsd-tests/cxx/tree/polymorphism/comparison/driver.cxx
index cadb225..502fa3c 100644
--- a/xsd-tests/cxx/tree/polymorphism/comparison/driver.cxx
+++ b/xsd-tests/cxx/tree/polymorphism/comparison/driver.cxx
@@ -10,6 +10,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/polymorphism/ostream/driver.cxx b/xsd-tests/cxx/tree/polymorphism/ostream/driver.cxx
index b030be9..8754ac0 100644
--- a/xsd-tests/cxx/tree/polymorphism/ostream/driver.cxx
+++ b/xsd-tests/cxx/tree/polymorphism/ostream/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/polymorphism/same-type/driver.cxx b/xsd-tests/cxx/tree/polymorphism/same-type/driver.cxx
index 94f82f5..bebd0a1 100644
--- a/xsd-tests/cxx/tree/polymorphism/same-type/driver.cxx
+++ b/xsd-tests/cxx/tree/polymorphism/same-type/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/prefix/driver.cxx b/xsd-tests/cxx/tree/prefix/driver.cxx
index bd2e46d..4eadf96 100644
--- a/xsd-tests/cxx/tree/prefix/driver.cxx
+++ b/xsd-tests/cxx/tree/prefix/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/test-template/driver.cxx b/xsd-tests/cxx/tree/test-template/driver.cxx
index 5257279..69c1ed9 100644
--- a/xsd-tests/cxx/tree/test-template/driver.cxx
+++ b/xsd-tests/cxx/tree/test-template/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/types-only/driver.cxx b/xsd-tests/cxx/tree/types-only/driver.cxx
index 730b807..f9cce83 100644
--- a/xsd-tests/cxx/tree/types-only/driver.cxx
+++ b/xsd-tests/cxx/tree/types-only/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/union/ctor/driver.cxx b/xsd-tests/cxx/tree/union/ctor/driver.cxx
index 246eea8..20d03ad 100644
--- a/xsd-tests/cxx/tree/union/ctor/driver.cxx
+++ b/xsd-tests/cxx/tree/union/ctor/driver.cxx
@@ -7,6 +7,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/wildcard/driver.cxx b/xsd-tests/cxx/tree/wildcard/driver.cxx
index e3040c7..2847391 100644
--- a/xsd-tests/cxx/tree/wildcard/driver.cxx
+++ b/xsd-tests/cxx/tree/wildcard/driver.cxx
@@ -15,6 +15,9 @@
#include <xsd/cxx/xml/string.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using namespace xercesc;
diff --git a/xsd-tests/failed/driver.cxx b/xsd-tests/failed/driver.cxx
index a84b24c..4154f9e 100644
--- a/xsd-tests/failed/driver.cxx
+++ b/xsd-tests/failed/driver.cxx
@@ -3,6 +3,9 @@
#include "test-00.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/manifest b/xsd-tests/manifest
index 23cae47..9170440 100644
--- a/xsd-tests/manifest
+++ b/xsd-tests/manifest
@@ -1,6 +1,6 @@
: 1
name: xsd-tests
-version: 4.2.0-b.1.z
+version: 4.2.0-b.2.z
project: xsd
summary: XML Schema to C++ data binding compiler tests
license: other: GPL-2.0-only with Xerces-C++ linking exception and FLOSS exception
@@ -9,7 +9,7 @@ url: https://www.codesynthesis.com/projects/xsd/
doc-url: https://www.codesynthesis.com/projects/xsd/
src-url: https://git.codesynthesis.com/cgit/xsd/xsd/tree/xsd-tests/
email: xsd-users@codesynthesis.com ; Mailing list
-depends: * build2 >= 0.14.0-
-depends: * bpkg >= 0.14.0-
+depends: * build2 >= 0.14.0
+depends: * bpkg >= 0.14.0
depends: libxsd == $
depends: libxerces-c ^3.0.0
diff --git a/xsd-tests/morphing/anonymous/attribute-group/driver.cxx b/xsd-tests/morphing/anonymous/attribute-group/driver.cxx
index 1632d7d..e2eb296 100644
--- a/xsd-tests/morphing/anonymous/attribute-group/driver.cxx
+++ b/xsd-tests/morphing/anonymous/attribute-group/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/morphing/anonymous/basic/driver.cxx b/xsd-tests/morphing/anonymous/basic/driver.cxx
index fc289eb..c3f081a 100644
--- a/xsd-tests/morphing/anonymous/basic/driver.cxx
+++ b/xsd-tests/morphing/anonymous/basic/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/morphing/anonymous/cyclic-inclusion/driver.cxx b/xsd-tests/morphing/anonymous/cyclic-inclusion/driver.cxx
index 9046ee4..d79f00f 100644
--- a/xsd-tests/morphing/anonymous/cyclic-inclusion/driver.cxx
+++ b/xsd-tests/morphing/anonymous/cyclic-inclusion/driver.cxx
@@ -4,6 +4,9 @@
#include "includee.hxx"
#include "includer.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/morphing/anonymous/group/driver.cxx b/xsd-tests/morphing/anonymous/group/driver.cxx
index 2a76396..23a80e6 100644
--- a/xsd-tests/morphing/anonymous/group/driver.cxx
+++ b/xsd-tests/morphing/anonymous/group/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/processing/inheritance/driver.cxx.in b/xsd-tests/processing/inheritance/driver.cxx.in
index df18427..b37ad02 100644
--- a/xsd-tests/processing/inheritance/driver.cxx.in
+++ b/xsd-tests/processing/inheritance/driver.cxx.in
@@ -3,6 +3,9 @@
#include "test-$num$.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/anonymous/driver.cxx b/xsd-tests/schema/anonymous/driver.cxx
index f902fdb..be1e3f0 100644
--- a/xsd-tests/schema/anonymous/driver.cxx
+++ b/xsd-tests/schema/anonymous/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/any-type/driver.cxx b/xsd-tests/schema/any-type/driver.cxx
index a94f099..9e82604 100644
--- a/xsd-tests/schema/any-type/driver.cxx
+++ b/xsd-tests/schema/any-type/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/any/driver.cxx.in b/xsd-tests/schema/any/driver.cxx.in
index 9c36761..33d5aa7 100644
--- a/xsd-tests/schema/any/driver.cxx.in
+++ b/xsd-tests/schema/any/driver.cxx.in
@@ -3,6 +3,9 @@
#include "$sch$.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/attribute-group/driver.cxx b/xsd-tests/schema/attribute-group/driver.cxx
index 328cef4..2ca9593 100644
--- a/xsd-tests/schema/attribute-group/driver.cxx
+++ b/xsd-tests/schema/attribute-group/driver.cxx
@@ -3,6 +3,9 @@
#include "global.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/attribute/driver.cxx b/xsd-tests/schema/attribute/driver.cxx
index 3d29b36..061e69c 100644
--- a/xsd-tests/schema/attribute/driver.cxx
+++ b/xsd-tests/schema/attribute/driver.cxx
@@ -5,6 +5,9 @@
#include "global.hxx"
#include "local.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/cardinality/driver.cxx b/xsd-tests/schema/cardinality/driver.cxx
index d8b218e..2c7dd73 100644
--- a/xsd-tests/schema/cardinality/driver.cxx
+++ b/xsd-tests/schema/cardinality/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/chameleon/driver.cxx b/xsd-tests/schema/chameleon/driver.cxx
index 7b408ef..553b1d3 100644
--- a/xsd-tests/schema/chameleon/driver.cxx
+++ b/xsd-tests/schema/chameleon/driver.cxx
@@ -4,6 +4,9 @@
#include "includer.hxx"
#include "schemas/includee.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/enumeration/driver.cxx b/xsd-tests/schema/enumeration/driver.cxx
index 406c8ab..df1f680 100644
--- a/xsd-tests/schema/enumeration/driver.cxx
+++ b/xsd-tests/schema/enumeration/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/forward/driver.cxx b/xsd-tests/schema/forward/driver.cxx
index ee6519e..e8c0de0 100644
--- a/xsd-tests/schema/forward/driver.cxx
+++ b/xsd-tests/schema/forward/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/group/driver.cxx b/xsd-tests/schema/group/driver.cxx
index e754194..d4744e5 100644
--- a/xsd-tests/schema/group/driver.cxx
+++ b/xsd-tests/schema/group/driver.cxx
@@ -4,6 +4,9 @@
#include "test.hxx"
#include "global.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/import/driver.cxx b/xsd-tests/schema/import/driver.cxx
index a94b2f3..aa289ea 100644
--- a/xsd-tests/schema/import/driver.cxx
+++ b/xsd-tests/schema/import/driver.cxx
@@ -3,6 +3,9 @@
#include "importer.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/include/driver.cxx b/xsd-tests/schema/include/driver.cxx
index 779d9d6..8276621 100644
--- a/xsd-tests/schema/include/driver.cxx
+++ b/xsd-tests/schema/include/driver.cxx
@@ -3,6 +3,9 @@
#include "includer.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/no-namespace/driver.cxx b/xsd-tests/schema/no-namespace/driver.cxx
index ef62942..6d31468 100644
--- a/xsd-tests/schema/no-namespace/driver.cxx
+++ b/xsd-tests/schema/no-namespace/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/recursive/driver.cxx b/xsd-tests/schema/recursive/driver.cxx
index 55c33cd..0e85546 100644
--- a/xsd-tests/schema/recursive/driver.cxx
+++ b/xsd-tests/schema/recursive/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/ref-type/valid/driver.cxx.in b/xsd-tests/schema/ref-type/valid/driver.cxx.in
index 434aa40..0c2936b 100644
--- a/xsd-tests/schema/ref-type/valid/driver.cxx.in
+++ b/xsd-tests/schema/ref-type/valid/driver.cxx.in
@@ -3,6 +3,9 @@
#include "$sch$.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/restriction/driver.cxx b/xsd-tests/schema/restriction/driver.cxx
index 2ffeb74..eeacc91 100644
--- a/xsd-tests/schema/restriction/driver.cxx
+++ b/xsd-tests/schema/restriction/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/union/driver.cxx b/xsd-tests/schema/union/driver.cxx
index 45f290f..2a0f699 100644
--- a/xsd-tests/schema/union/driver.cxx
+++ b/xsd-tests/schema/union/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd/README b/xsd/README
index 80d707f..dc1d4db 100644
--- a/xsd/README
+++ b/xsd/README
@@ -13,6 +13,8 @@ defined in XML Schema. Using these parser templates you can build
your own in-memory representations or perform immediate processing
of XML instance documents.
+Note also that the xsd executable provides build2 metadata.
+
See the NEWS file for the user-visible changes from the previous release.
See the LICENSE file for distribution conditions.
diff --git a/xsd/build/root.build b/xsd/build/root.build
index ace0237..4407c3e 100644
--- a/xsd/build/root.build
+++ b/xsd/build/root.build
@@ -1,6 +1,11 @@
# file : build/root.build
# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+config [bool] config.xsd.develop ?= false
+
+define cli: file
+cli{*}: extension = cli
+
using in
cxx.std = latest
@@ -20,14 +25,6 @@ if ($cxx.class == 'msvc')
cxx.poptions =+ "-I$out_root" "-I$src_root"
-# Load the cli module but only if it's available. This way a distribution
-# that includes pre-generated files can be built without installing cli.
-# This is also the reason why we need to explicitly spell out individual
-# source file prerequisites instead of using the cli.cxx{} group (it won't
-# be there unless the module is configured).
-#
-using? cli
-
# Extract the copyright notice from the LICENSE file.
#
# Note that cat is a builtin which means this is both portable and fast.
diff --git a/xsd/doc/buildfile b/xsd/doc/buildfile
index ccfc060..b15831a 100644
--- a/xsd/doc/buildfile
+++ b/xsd/doc/buildfile
@@ -25,7 +25,7 @@ png{*}: extension = png
define svg: file
svg{*}: extension = svg
-import? [metadata] cli = cli%exe{cli}
+import! [metadata] cli = cli%exe{cli}
# Import the html2ps and ps2pdf14 programs only if present on the system. This
# way a distribution that includes pre-generated files can be built without
@@ -34,99 +34,103 @@ import? [metadata] cli = cli%exe{cli}
import? html2ps = html2ps%exe{html2ps}
import? ps2pdf14 = ps2pdf14%exe{ps2pdf14}
+if $config.xsd.develop
+{
+ if ($html2ps == [null] || $ps2pdf14 == [null])
+ warn "html2ps and/or ps2pdf14 are not available, not generating .ps and .pdf documentation"
+}
+
./: xsd{custom-literals}
-# Note that we include the cli, html2ps, and ps2pdf14 generated files into the
-# distribution and don't remove them when cleaning in src (so that clean
-# results in a state identical to distributed).
+# Generate the man pages.
+#
+ops = $(src_root)/xsd/cxx/cli{options tree/options parser/options}
+
+doc_version = [string] "$version.major\.$version.minor\.$version.patch"
+if $version.pre_release
+ doc_version += "-$version.pre_release_string"
-# Generate the man pages if the cli program is available and handle (install,
-# distribute, etc) the pre-generated files otherwise, if present.
+# Let's take the last for-digit number to cover 2000-2021,2022.
#
-if ($cli != [null])
-{
- ./: {man1 xhtml}{xsd}
-
- man_topics = $(src_root)/xsd/cxx/cli{options tree/options parser/options}
-
- man_options = -v project="XSD" \
- -v version="$version.project_id" \
- -v copyright="$copyright" \
- -I $src_root \
- --stdout \
- --suppress-undocumented \
- --exclude-base
-
- man1{xsd}: $man_topics \
- man1{xsd-prologue \
- xsd-tree-header \
- xsd-parser-header \
- xsd-epilogue} \
- $cli
- {
- dist = true
- clean = ($src_root != $out_root)
- }
- {{
- diag cli $> : ($<[0]) # @@ TMP: revise
+doc_year = $regex.replace($copyright, '.+[-, ]([0-9][0-9][0-9][0-9]) .+', '\1')
- # Note that the date change doesn't change the script semantics, thus the
- # variable is defined locally.
- #
- date +"%B %Y" | set date
-
- $cli --generate-man -v date="$date" $man_options \
- --class CXX::options \
- --class options \
- --man-prologue-file $path($<[3]) \
- $path($<[0]) >$path($>)
-
- $cli --generate-man -v date="$date" $man_options \
- --man-prologue-file $path($<[4]) \
- $path($<[1]) >>$path($>)
-
- $cli --generate-man -v date="$date" $man_options \
- --man-prologue-file $path($<[5]) \
- --man-epilogue-file $path($<[6]) \
- $path($<[2]) >>$path($>)
- }}
-
- xhtml{xsd}: $man_topics \
- xhtml{xsd-prologue \
- xsd-tree-header \
- xsd-parser-header \
- xsd-epilogue} \
- css{*} \
- $cli
- {
- dist = true
- clean = ($src_root != $out_root)
- }
- {{
- diag cli $> : ($<[0]) # @@ TMP: revise
-
- date +"%B %Y" | set date
-
- $cli --generate-html -v date="$date" $man_options \
- --class CXX::options \
- --class options \
- --html-prologue-file $path($<[3]) \
- $path($<[0]) >$path($>)
-
- $cli --generate-html -v date="$date" $man_options \
- --html-prologue-file $path($<[4]) \
- $path($<[1]) >>$path($>)
-
- $cli --generate-html -v date="$date" $man_options \
- --html-prologue-file $path($<[5]) \
- --html-epilogue-file $path($<[6]) \
- $path($<[2]) >>$path($>)
- }}
+man_options = -v project="XSD" \
+ -v version="$doc_version" \
+ -v copyright="$copyright" \
+ -I $src_root \
+ --stdout \
+ --suppress-undocumented \
+ --exclude-base
+
+
+# Note: *logue and *-header are not real man pages.
+#
+./: man1{xsd}: $ops \
+ file{xsd-prologue.1 \
+ xsd-tree-header.1 \
+ xsd-parser-header.1 \
+ xsd-epilogue.1} \
+ $cli
+{
+ dist = true # Include into the distribution for user's convenience.
}
-else
- # Distribute both the pre-generated file (if present) and the sources.
+{{
+ diag cli --man ($<[0])
+
+ # Use the copyright year to approximate the last authoring date.
#
- ./: {man1 xhtml}{+xsd xsd-*} css{*}
+ $cli --generate-man -v date="January $doc_year" \
+ $man_options \
+ --class CXX::options \
+ --class options \
+ --man-prologue-file $path($<[3]) \
+ $path($<[0]) >$path($>)
+
+ $cli --generate-man -v date="January $doc_year" \
+ $man_options \
+ --man-prologue-file $path($<[4]) \
+ $path($<[1]) >>$path($>)
+
+ $cli --generate-man -v date="January $doc_year" \
+ $man_options \
+ --man-prologue-file $path($<[5]) \
+ --man-epilogue-file $path($<[6]) \
+ $path($<[2]) >>$path($>)
+}}
+
+# Note: *logue and *-header are not real xhtml files.
+#
+./: xhtml{xsd}: $ops \
+ file{xsd-prologue.xhtml \
+ xsd-tree-header.xhtml \
+ xsd-parser-header.xhtml \
+ xsd-epilogue.xhtml} \
+ css{*} \
+ $cli
+{
+ dist = true
+}
+{{
+ diag cli --html ($<[0])
+
+ $cli --generate-html -v date="January $doc_year" \
+ $man_options \
+ --class CXX::options \
+ --class options \
+ --html-prologue-file $path($<[3]) \
+ $path($<[0]) >$path($>)
+
+ $cli --generate-html -v date="January $doc_year" \
+ $man_options \
+ --html-prologue-file $path($<[4]) \
+ $path($<[1]) >>$path($>)
+
+ $cli --generate-html -v date="January $doc_year" \
+ $man_options \
+ --html-prologue-file $path($<[5]) \
+ --html-epilogue-file $path($<[6]) \
+ $path($<[2]) >>$path($>)
+}}
# Generate the user guide/manual ps/pdf files if the html2ps and ps2pdf14
# programs are imported and handle (install, distribute, etc) the
@@ -138,50 +142,55 @@ for d: cxx/parser/guide/ cxx/tree/guide/ cxx/tree/manual/
l = "([dir_path] $path.leaf($d))" # guide, manual
f = "cxx-$p-$l" # cxx-parser-guide, etc
- ./: $d/xhtml{index}: $d/{png svg}{*}
+ ./: $d/{png svg}{*}
- $d/xhtml{index}: $d/in{index}
+ ./: $d/xhtml{index}: $d/in{index}
{
in.symbol = '@'
+
+ dist = true
+ clean = ($src_root != $out_root)
}
- if ($html2ps != [null])
+ if ($html2ps != [null] && $ps2pdf14 != [null])
{
+ # Note that we include these generated files into the distribution and
+ # don't remove them when cleaning in src (so that clean results in a state
+ # identical to distributed).
+ #
./: $d/ps{$f}: $d/xhtml{index} $d/html2ps{$l} $html2ps
{
+ base = $src_base/$d
+
+ dist = true
+ clean = ($src_root != $out_root)
+ }
+ {{
+ diag html2ps ($<[0])
+
+ # Note: --base must include trailing directory separator.
+ #
+ $html2ps --base $base -f $path($<[1]) -o $path($>) $path($<[0])
+ }}
+
+ ./: $d/pdf{$f}: $d/ps{$f} $ps2pdf14
+ {
dist = true
clean = ($src_root != $out_root)
}
{{
- diag html2ps $> : ($<[0]) # @@ TMP: revise
+ diag ps2pdf14 ($<[0])
- $html2ps -f $path($<[1]) -o $path($>) $path($<[0])
+ $ps2pdf14 -dOptimize=true -dEmbedAllFonts=true $path($<[0]) $path($>)
}}
- if ($ps2pdf14 != [null])
+ $d/html2ps{$l}: $d/in{$l}
{
- ./: $d/pdf{$f}: $d/ps{$f} $ps2pdf14
- {
- dist = true
- clean = ($src_root != $out_root)
- }
- {{
- diag ps2pdf14 $> : ($<[0]) # @@ TMP: revise
-
- $ps2pdf14 -dOptimize=true -dEmbedAllFonts=true $path($<[0]) $path($>)
- }}
+ in.symbol = '@'
}
- else
- ./: $d/pdf{+$f}
}
else
- ./: $d/{ps pdf}{+$f} $d/html2ps{$l}
-
- $d/html2ps{$l}: $d/in{$l}
- {
- in.symbol = '@'
- }
+ ./: $d/{ps pdf}{+$f} $d/file{$l.html2ps.in}
}
-{man1 xhtml}{xsd-*}: install = false # xsd-prologue, etc
-doc{*}: install.subdirs = true
+doc{*}: install.subdirs = true
diff --git a/xsd/manifest b/xsd/manifest
index 2db6662..52e789a 100644
--- a/xsd/manifest
+++ b/xsd/manifest
@@ -1,6 +1,6 @@
: 1
name: xsd
-version: 4.2.0-b.1.z
+version: 4.2.0-b.2.z
summary: XML Schema to C++ data binding compiler
license: other: GPL-2.0-only with Xerces-C++ linking exception and FLOSS exception
topics: C++, XML, XML Schema, XML parser, source code generation
@@ -11,14 +11,13 @@ doc-url: https://www.codesynthesis.com/projects/xsd/
src-url: https://git.codesynthesis.com/cgit/xsd/xsd/tree/xsd/
email: xsd-users@codesynthesis.com ; Mailing list
build-warning-email: builds@codesynthesis.com
-builds: host : &default
+requires: host
requires: c++11
-depends: * build2 >= 0.14.0-
-depends: * bpkg >= 0.14.0-
-# @@ Should probably become conditional dependency.
-requires: ? cli ; Only required if changing .cli files.
+depends: * build2 >= 0.14.0
+depends: * bpkg >= 0.14.0
depends: libxsd-frontend ^2.1.0-
depends: libcutl ^1.11.0-
depends: libxerces-c ^3.0.0
+depends: * cli ^1.2.0-
tests: * xsd-tests == $
examples: * xsd-examples == $
diff --git a/xsd/xsd/buildfile b/xsd/xsd/buildfile
index 49fbf2c..1a58561 100644
--- a/xsd/xsd/buildfile
+++ b/xsd/xsd/buildfile
@@ -5,64 +5,74 @@ import libs = libxsd-frontend%lib{xsd-frontend}
import libs += libcutl%lib{cutl}
import libs += libxerces-c%lib{xerces-c}
-options_topics = options cxx/options cxx/parser/options cxx/tree/options
+import! [metadata] cli = cli%exe{cli}
-./: exe{xsd}: {hxx ixx txx cxx}{** -{$options_topics} -version} \
- {hxx ixx cxx}{$options_topics} \
- {hxx}{version} \
+ops = options cxx/options cxx/parser/options cxx/tree/options
+
+./: exe{xsd}: {hxx ixx txx cxx}{** -{$ops} -version} \
+ {hxx ixx cxx}{$ops} \
+ {hxx}{version} \
$libs
# Target metadata, see also --build2-metadata in xsd.cxx.
#
+# Note that xsd does not query any environment variables.
+#
exe{xsd}:
{
export.metadata = 1 xsd
xsd.name = [string] xsd
- xsd.version = $version
- xsd.checksum = $version
+ xsd.version = [string] $version
+ xsd.checksum = [string] $version
}
hxx{version}: in{version} $src_root/manifest
-# Build options.
-#
-# Pass the copyright notice extracted from the LICENSE file.
-#
-obj{xsd cxx/parser/generator cxx/tree/generator}: \
- cxx.poptions += -DXSD_COPYRIGHT=\"$copyright\"
-
# Generated options parser.
#
-if $cli.configured
-{
- cli.cxx{options}: cli{options}
- cxx/cli.cxx{options}: cxx/cli{options}
- cxx/parser/cli.cxx{options}: cxx/parser/cli{options}
- cxx/tree/cli.cxx{options}: cxx/tree/cli{options}
-
- cli.options += --std c++11 -I $src_root --generate-specifier \
---ostream-type ::std::wostream --exclude-base --suppress-undocumented \
---generate-file-scanner --include-with-brackets --option-length 28 \
+# Note: tracking .cli dependencies manually.
+#
+cli_options = --std c++11 -I $src_root --generate-specifier \
+--generate-file-scanner --suppress-undocumented \
+--ostream-type ::std::wostream --exclude-base \
+--include-with-brackets --option-length 28 \
--cxx-prologue '#include <xsd/options-parser.hxx>'
- cli.cxx{options}: cli.options += --include-prefix xsd --guard-prefix XSD
+<{hxx ixx cxx}{options}>: cli{options}
+{
+ cli_options += --include-prefix xsd --guard-prefix XSD
+}
- cxx/cli.cxx{options}: cli.options += --include-prefix xsd/cxx \
- --guard-prefix XSD_CXX
+<cxx/{hxx ixx cxx}{options}>: cxx/cli{options} cli{options}
+{
+ cli_options += --include-prefix xsd/cxx --guard-prefix XSD_CXX
+}
- cxx/parser/cli.cxx{options}: cli.options += --include-prefix xsd/cxx/parser \
- --guard-prefix XSD_CXX_PARSER
+<cxx/parser/{hxx ixx cxx}{options}>: cxx/parser/cli{options} cxx/cli{options} \
+ cli{options}
+{
+ cli_options += --include-prefix xsd/cxx/parser --guard-prefix XSD_CXX_PARSER
+}
- cxx/tree/cli.cxx{options}: cli.options += --include-prefix xsd/cxx/tree \
- --guard-prefix XSD_CXX_TREE
+<cxx/tree/{hxx ixx cxx}{options}>: cxx/tree/cli{options} cxx/cli{options} \
+ cli{options}
+{
+ cli_options += --include-prefix xsd/cxx/tree --guard-prefix XSD_CXX_TREE
+}
- # Include the generated cli files into the distribution and don't remove
- # them when cleaning in src (so that clean results in a state identical to
- # distributed).
+<hxx{~'/(.*)/'} ixx{~'/\1/'} cxx{~'/\1/'}>: cli{~'/\1/'} $cli
+{
+ # Symlink the generated code in src for convenience of development.
#
- cli.cxx{*}:
- {
- dist = true
- clean = ($src_root != $out_root)
- }
+ backlink = true
}
+{{
+ $cli $cli_options -o $directory($path($>[0])) $path($<[0])
+}}
+
+# Build options.
+#
+# Pass the copyright notice extracted from the LICENSE file.
+#
+obj{xsd cxx/parser/generator cxx/tree/generator}: \
+ cxx.poptions += -DXSD_COPYRIGHT=\"$copyright\"