aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-09-17 18:56:22 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-09-17 18:56:22 +0200
commitc34af468acc94691d0a5954eae38a89506bc620e (patch)
tree828e27a83547c0c12fa54512e12285d680f805f3 /tests
parentb3ede28237491c6c5ce2338d4f552d095f9430d6 (diff)
Generate .gitignore in compiler, test and example makefiles
Diffstat (limited to 'tests')
-rw-r--r--tests/cxx/parser/built-in/makefile21
-rw-r--r--tests/cxx/parser/enumeration/makefile22
-rw-r--r--tests/cxx/parser/generated-impl/makefile26
-rw-r--r--tests/cxx/parser/list/makefile20
-rw-r--r--tests/cxx/parser/name-clash/inheritance/makefile22
-rw-r--r--tests/cxx/parser/polymorphism/same-type/makefile22
-rw-r--r--tests/cxx/parser/recursive/makefile22
-rw-r--r--tests/cxx/parser/test-template/makefile20
-rw-r--r--tests/cxx/parser/union/makefile20
-rw-r--r--tests/cxx/parser/validation/all/makefile22
-rw-r--r--tests/cxx/parser/validation/any/makefile22
-rw-r--r--tests/cxx/parser/validation/attribute/makefile22
-rw-r--r--tests/cxx/parser/validation/built-in/any-type/makefile22
-rw-r--r--tests/cxx/parser/validation/built-in/binary/makefile10
-rw-r--r--tests/cxx/parser/validation/built-in/boolean/makefile10
-rw-r--r--tests/cxx/parser/validation/built-in/byte/makefile10
-rw-r--r--tests/cxx/parser/validation/built-in/date-time/makefile10
-rw-r--r--tests/cxx/parser/validation/built-in/float/makefile10
-rw-r--r--tests/cxx/parser/validation/built-in/int/makefile10
-rw-r--r--tests/cxx/parser/validation/built-in/integer/makefile10
-rw-r--r--tests/cxx/parser/validation/built-in/long/makefile10
-rw-r--r--tests/cxx/parser/validation/built-in/qname/makefile10
-rw-r--r--tests/cxx/parser/validation/built-in/short/makefile10
-rw-r--r--tests/cxx/parser/validation/built-in/string/makefile10
-rw-r--r--tests/cxx/parser/validation/built-in/uri/makefile10
-rw-r--r--tests/cxx/parser/validation/choice/makefile23
-rw-r--r--tests/cxx/parser/validation/restriction/makefile22
-rw-r--r--tests/cxx/parser/validation/sequence/makefile22
-rw-r--r--tests/cxx/tree/binary/cdr/makefile29
-rw-r--r--tests/cxx/tree/binary/polymorphic/makefile30
-rw-r--r--tests/cxx/tree/binary/xdr/makefile27
-rw-r--r--tests/cxx/tree/built-in/makefile43
-rw-r--r--tests/cxx/tree/chameleon/makefile27
-rw-r--r--tests/cxx/tree/comparison/makefile26
-rw-r--r--tests/cxx/tree/compilation/makefile26
-rw-r--r--tests/cxx/tree/complex/ctor/makefile29
-rw-r--r--tests/cxx/tree/containment/makefile26
-rw-r--r--tests/cxx/tree/default/makefile29
-rw-r--r--tests/cxx/tree/encoding/char/lcp/makefile26
-rw-r--r--tests/cxx/tree/encoding/char/utf-8/makefile27
-rw-r--r--tests/cxx/tree/encoding/wchar/makefile28
-rw-r--r--tests/cxx/tree/enumeration/ctor/makefile28
-rw-r--r--tests/cxx/tree/enumeration/inheritance/makefile26
-rw-r--r--tests/cxx/tree/float/makefile26
-rw-r--r--tests/cxx/tree/list/ctor/makefile28
-rw-r--r--tests/cxx/tree/name-clash/inheritance/makefile26
-rw-r--r--tests/cxx/tree/naming/camel/makefile26
-rw-r--r--tests/cxx/tree/naming/java/makefile26
-rw-r--r--tests/cxx/tree/naming/knr/makefile26
-rw-r--r--tests/cxx/tree/polymorphism/comparison/makefile27
-rw-r--r--tests/cxx/tree/polymorphism/ostream/makefile27
-rw-r--r--tests/cxx/tree/polymorphism/same-type/makefile28
-rw-r--r--tests/cxx/tree/prefix/makefile14
-rw-r--r--tests/cxx/tree/test-template/makefile26
-rw-r--r--tests/cxx/tree/types-only/makefile26
-rw-r--r--tests/cxx/tree/union/ctor/makefile28
-rw-r--r--tests/cxx/tree/wildcard/makefile29
57 files changed, 860 insertions, 400 deletions
diff --git a/tests/cxx/parser/built-in/makefile b/tests/cxx/parser/built-in/makefile
index c38e16a..1f6b86c 100644
--- a/tests/cxx/parser/built-in/makefile
+++ b/tests/cxx/parser/built-in/makefile
@@ -28,12 +28,11 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-skel := $(out_base)/$(xsd:.xsd=-pskel.hxx) \
- $(out_base)/$(xsd:.xsd=-pskel.ixx) \
- $(out_base)/$(xsd:.xsd=-pskel.cxx)
+genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(skel): xsd := $(out_root)/xsd/xsd
-$(skel): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -60,6 +59,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
@@ -72,4 +82,3 @@ $(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
# Dependencies.
#
$(call import,$(src_root)/xsd/makefile)
-
diff --git a/tests/cxx/parser/enumeration/makefile b/tests/cxx/parser/enumeration/makefile
index 0376d1a..d448a55 100644
--- a/tests/cxx/parser/enumeration/makefile
+++ b/tests/cxx/parser/enumeration/makefile
@@ -28,13 +28,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-skel := $(out_base)/$(xsd:.xsd=-pskel.hxx) \
- $(out_base)/$(xsd:.xsd=-pskel.ixx) \
- $(out_base)/$(xsd:.xsd=-pskel.cxx)
+genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(skel): xsd := $(out_root)/xsd/xsd
-$(skel): xsd_options := --type-map $(src_base)/test.map
-$(skel): $(out_root)/xsd/xsd $(src_base)/test.map
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --type-map $(src_base)/test.map
+$(gen): $(out_root)/xsd/xsd $(src_base)/test.map
$(call include-dep,$(dep))
@@ -61,6 +60,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/generated-impl/makefile b/tests/cxx/parser/generated-impl/makefile
index 71f94ab..f1db7ed 100644
--- a/tests/cxx/parser/generated-impl/makefile
+++ b/tests/cxx/parser/generated-impl/makefile
@@ -27,12 +27,15 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-gen := $(out_base)/$(xsd:.xsd=-pskel.hxx) \
- $(out_base)/$(xsd:.xsd=-pskel.ixx) \
- $(out_base)/$(xsd:.xsd=-pskel.cxx) \
- $(out_base)/$(xsd:.xsd=-pimpl.hxx) \
- $(out_base)/$(xsd:.xsd=-pimpl.cxx) \
- $(out_base)/$(xsd:.xsd=-driver.cxx)
+genf := $(xsd:.xsd=-pskel.hxx) \
+ $(xsd:.xsd=-pskel.ixx) \
+ $(xsd:.xsd=-pskel.cxx) \
+ $(xsd:.xsd=-pimpl.hxx) \
+ $(xsd:.xsd=-pimpl.cxx) \
+ $(xsd:.xsd=-driver.cxx)
+
+gen := $(addprefix $(out_base)/,$(genf))
+
$(gen): xsd := $(out_root)/xsd/xsd
$(gen): xsd_options := --generate-print-impl --generate-test-driver \
@@ -65,6 +68,17 @@ $(clean): $(driver).o.clean \
$(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean)) \
$(addprefix $(out_base)/,$(xsd:.xsd=-pimpl.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := $(xsd:.xsd=-driver) $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/list/makefile b/tests/cxx/parser/list/makefile
index c86fc31..84c24a4 100644
--- a/tests/cxx/parser/list/makefile
+++ b/tests/cxx/parser/list/makefile
@@ -28,12 +28,11 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-skel := $(out_base)/$(xsd:.xsd=-pskel.hxx) \
- $(out_base)/$(xsd:.xsd=-pskel.ixx) \
- $(out_base)/$(xsd:.xsd=-pskel.cxx)
+genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(skel): xsd := $(out_root)/xsd/xsd
-$(skel): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -60,6 +59,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/name-clash/inheritance/makefile b/tests/cxx/parser/name-clash/inheritance/makefile
index 1d530d7..16f737e 100644
--- a/tests/cxx/parser/name-clash/inheritance/makefile
+++ b/tests/cxx/parser/name-clash/inheritance/makefile
@@ -28,13 +28,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-skel := $(out_base)/$(xsd:.xsd=-pskel.hxx) \
- $(out_base)/$(xsd:.xsd=-pskel.ixx) \
- $(out_base)/$(xsd:.xsd=-pskel.cxx)
+genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(skel): xsd := $(out_root)/xsd/xsd
-$(skel): xsd_options := --generate-validation
-$(skel): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-validation
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -61,6 +60,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/polymorphism/same-type/makefile b/tests/cxx/parser/polymorphism/same-type/makefile
index 5fb28b1..ff4183d 100644
--- a/tests/cxx/parser/polymorphism/same-type/makefile
+++ b/tests/cxx/parser/polymorphism/same-type/makefile
@@ -28,13 +28,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-skel := $(out_base)/$(xsd:.xsd=-pskel.hxx) \
- $(out_base)/$(xsd:.xsd=-pskel.ixx) \
- $(out_base)/$(xsd:.xsd=-pskel.cxx)
+genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(skel): xsd := $(out_root)/xsd/xsd
-$(skel): xsd_options := --generate-polymorphic
-$(skel): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-polymorphic
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -61,6 +60,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/recursive/makefile b/tests/cxx/parser/recursive/makefile
index 20b4599..976a1b3 100644
--- a/tests/cxx/parser/recursive/makefile
+++ b/tests/cxx/parser/recursive/makefile
@@ -28,13 +28,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-skel := $(out_base)/$(xsd:.xsd=-pskel.hxx) \
- $(out_base)/$(xsd:.xsd=-pskel.ixx) \
- $(out_base)/$(xsd:.xsd=-pskel.cxx)
+genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(skel): xsd := $(out_root)/xsd/xsd
-$(skel): xsd_options := --generate-validation
-$(skel): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-validation
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -61,6 +60,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/test-template/makefile b/tests/cxx/parser/test-template/makefile
index 3b6855a..5047b10 100644
--- a/tests/cxx/parser/test-template/makefile
+++ b/tests/cxx/parser/test-template/makefile
@@ -28,12 +28,11 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-skel := $(out_base)/$(xsd:.xsd=-pskel.hxx) \
- $(out_base)/$(xsd:.xsd=-pskel.ixx) \
- $(out_base)/$(xsd:.xsd=-pskel.cxx)
+genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(skel): xsd := $(out_root)/xsd/xsd
-$(skel): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -60,6 +59,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/union/makefile b/tests/cxx/parser/union/makefile
index 0e186b7..538d4c1 100644
--- a/tests/cxx/parser/union/makefile
+++ b/tests/cxx/parser/union/makefile
@@ -28,12 +28,11 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-skel := $(out_base)/$(xsd:.xsd=-pskel.hxx) \
- $(out_base)/$(xsd:.xsd=-pskel.ixx) \
- $(out_base)/$(xsd:.xsd=-pskel.cxx)
+genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(skel): xsd := $(out_root)/xsd/xsd
-$(skel): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -60,6 +59,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/all/makefile b/tests/cxx/parser/validation/all/makefile
index 7295256..1e1b33c 100644
--- a/tests/cxx/parser/validation/all/makefile
+++ b/tests/cxx/parser/validation/all/makefile
@@ -30,13 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-skel := $(out_base)/$(xsd:.xsd=-pskel.hxx) \
- $(out_base)/$(xsd:.xsd=-pskel.ixx) \
- $(out_base)/$(xsd:.xsd=-pskel.cxx)
+genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(skel): xsd := $(out_root)/xsd/xsd
-$(skel): xsd_options := --generate-validation
-$(skel): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-validation
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -71,6 +70,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/any/makefile b/tests/cxx/parser/validation/any/makefile
index 76d8618..19fc057 100644
--- a/tests/cxx/parser/validation/any/makefile
+++ b/tests/cxx/parser/validation/any/makefile
@@ -30,13 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-skel := $(out_base)/$(xsd:.xsd=-pskel.hxx) \
- $(out_base)/$(xsd:.xsd=-pskel.ixx) \
- $(out_base)/$(xsd:.xsd=-pskel.cxx)
+genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(skel): xsd := $(out_root)/xsd/xsd
-$(skel): xsd_options := --generate-validation
-$(skel): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-validation
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -71,6 +70,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/attribute/makefile b/tests/cxx/parser/validation/attribute/makefile
index 281d174..d5a83a3 100644
--- a/tests/cxx/parser/validation/attribute/makefile
+++ b/tests/cxx/parser/validation/attribute/makefile
@@ -30,13 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-skel := $(out_base)/$(xsd:.xsd=-pskel.hxx) \
- $(out_base)/$(xsd:.xsd=-pskel.ixx) \
- $(out_base)/$(xsd:.xsd=-pskel.cxx)
+genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(skel): xsd := $(out_root)/xsd/xsd
-$(skel): xsd_options := --generate-validation
-$(skel): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-validation
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -71,6 +70,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/built-in/any-type/makefile b/tests/cxx/parser/validation/built-in/any-type/makefile
index 613eb35..1c93b76 100644
--- a/tests/cxx/parser/validation/built-in/any-type/makefile
+++ b/tests/cxx/parser/validation/built-in/any-type/makefile
@@ -30,13 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-skel := $(out_base)/$(xsd:.xsd=-pskel.hxx) \
- $(out_base)/$(xsd:.xsd=-pskel.ixx) \
- $(out_base)/$(xsd:.xsd=-pskel.cxx)
+genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(skel): xsd := $(out_root)/xsd/xsd
-$(skel): xsd_options := --generate-validation
-$(skel): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-validation
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -71,6 +70,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/built-in/binary/makefile b/tests/cxx/parser/validation/built-in/binary/makefile
index 1a62471..27ddeef 100644
--- a/tests/cxx/parser/validation/built-in/binary/makefile
+++ b/tests/cxx/parser/validation/built-in/binary/makefile
@@ -52,6 +52,16 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(obj)) \
$(addsuffix .cxx.clean,$(dep))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/built-in/boolean/makefile b/tests/cxx/parser/validation/built-in/boolean/makefile
index bc753b2..bf16586 100644
--- a/tests/cxx/parser/validation/built-in/boolean/makefile
+++ b/tests/cxx/parser/validation/built-in/boolean/makefile
@@ -52,6 +52,16 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(obj)) \
$(addsuffix .cxx.clean,$(dep))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/built-in/byte/makefile b/tests/cxx/parser/validation/built-in/byte/makefile
index 7e3655b..efe7f01 100644
--- a/tests/cxx/parser/validation/built-in/byte/makefile
+++ b/tests/cxx/parser/validation/built-in/byte/makefile
@@ -52,6 +52,16 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(obj)) \
$(addsuffix .cxx.clean,$(dep))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/built-in/date-time/makefile b/tests/cxx/parser/validation/built-in/date-time/makefile
index 1d1dd20..12eb7ba 100644
--- a/tests/cxx/parser/validation/built-in/date-time/makefile
+++ b/tests/cxx/parser/validation/built-in/date-time/makefile
@@ -52,6 +52,16 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(obj)) \
$(addsuffix .cxx.clean,$(dep))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/built-in/float/makefile b/tests/cxx/parser/validation/built-in/float/makefile
index b6c478d..1a39e04 100644
--- a/tests/cxx/parser/validation/built-in/float/makefile
+++ b/tests/cxx/parser/validation/built-in/float/makefile
@@ -52,6 +52,16 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(obj)) \
$(addsuffix .cxx.clean,$(dep))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/built-in/int/makefile b/tests/cxx/parser/validation/built-in/int/makefile
index e70782a..c626a9c 100644
--- a/tests/cxx/parser/validation/built-in/int/makefile
+++ b/tests/cxx/parser/validation/built-in/int/makefile
@@ -52,6 +52,16 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(obj)) \
$(addsuffix .cxx.clean,$(dep))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/built-in/integer/makefile b/tests/cxx/parser/validation/built-in/integer/makefile
index 8b0d68c..8d52dee 100644
--- a/tests/cxx/parser/validation/built-in/integer/makefile
+++ b/tests/cxx/parser/validation/built-in/integer/makefile
@@ -52,6 +52,16 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(obj)) \
$(addsuffix .cxx.clean,$(dep))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/built-in/long/makefile b/tests/cxx/parser/validation/built-in/long/makefile
index 201a984..b9289b1 100644
--- a/tests/cxx/parser/validation/built-in/long/makefile
+++ b/tests/cxx/parser/validation/built-in/long/makefile
@@ -52,6 +52,16 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(obj)) \
$(addsuffix .cxx.clean,$(dep))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/built-in/qname/makefile b/tests/cxx/parser/validation/built-in/qname/makefile
index 496af30..b541239 100644
--- a/tests/cxx/parser/validation/built-in/qname/makefile
+++ b/tests/cxx/parser/validation/built-in/qname/makefile
@@ -52,6 +52,16 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(obj)) \
$(addsuffix .cxx.clean,$(dep))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/built-in/short/makefile b/tests/cxx/parser/validation/built-in/short/makefile
index c3916dc..0457f13 100644
--- a/tests/cxx/parser/validation/built-in/short/makefile
+++ b/tests/cxx/parser/validation/built-in/short/makefile
@@ -52,6 +52,16 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(obj)) \
$(addsuffix .cxx.clean,$(dep))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/built-in/string/makefile b/tests/cxx/parser/validation/built-in/string/makefile
index 7ac9c5a..46b7b5f 100644
--- a/tests/cxx/parser/validation/built-in/string/makefile
+++ b/tests/cxx/parser/validation/built-in/string/makefile
@@ -52,6 +52,16 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(obj)) \
$(addsuffix .cxx.clean,$(dep))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/built-in/uri/makefile b/tests/cxx/parser/validation/built-in/uri/makefile
index b6341b0..1a28808 100644
--- a/tests/cxx/parser/validation/built-in/uri/makefile
+++ b/tests/cxx/parser/validation/built-in/uri/makefile
@@ -52,6 +52,16 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(obj)) \
$(addsuffix .cxx.clean,$(dep))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/choice/makefile b/tests/cxx/parser/validation/choice/makefile
index 2e957d6..d808ee2 100644
--- a/tests/cxx/parser/validation/choice/makefile
+++ b/tests/cxx/parser/validation/choice/makefile
@@ -30,13 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-skel := $(out_base)/$(xsd:.xsd=-pskel.hxx) \
- $(out_base)/$(xsd:.xsd=-pskel.ixx) \
- $(out_base)/$(xsd:.xsd=-pskel.cxx)
+genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(skel): xsd := $(out_root)/xsd/xsd
-$(skel): xsd_options := --generate-validation
-$(skel): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-validation
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -54,7 +53,6 @@ test_targets := $(addprefix $(out_base)/.test-,$(tests))
.PHONY: $(test)
$(test): $(test_targets)
-
$(test_targets): driver := $(driver)
.PHONY: $(out_base)/.test-%
@@ -71,6 +69,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/restriction/makefile b/tests/cxx/parser/validation/restriction/makefile
index bb78c5e..c7914c2 100644
--- a/tests/cxx/parser/validation/restriction/makefile
+++ b/tests/cxx/parser/validation/restriction/makefile
@@ -30,13 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-skel := $(out_base)/$(xsd:.xsd=-pskel.hxx) \
- $(out_base)/$(xsd:.xsd=-pskel.ixx) \
- $(out_base)/$(xsd:.xsd=-pskel.cxx)
+genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(skel): xsd := $(out_root)/xsd/xsd
-$(skel): xsd_options := --generate-validation
-$(skel): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-validation
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -71,6 +70,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/parser/validation/sequence/makefile b/tests/cxx/parser/validation/sequence/makefile
index e06b3a0..7040d98 100644
--- a/tests/cxx/parser/validation/sequence/makefile
+++ b/tests/cxx/parser/validation/sequence/makefile
@@ -30,13 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-skel := $(out_base)/$(xsd:.xsd=-pskel.hxx) \
- $(out_base)/$(xsd:.xsd=-pskel.ixx) \
- $(out_base)/$(xsd:.xsd=-pskel.cxx)
+genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(skel): xsd := $(out_root)/xsd/xsd
-$(skel): xsd_options := --generate-validation
-$(skel): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-validation
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -71,6 +70,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/binary/cdr/makefile b/tests/cxx/tree/binary/cdr/makefile
index 3298f18..9f34852 100644
--- a/tests/cxx/tree/binary/cdr/makefile
+++ b/tests/cxx/tree/binary/cdr/makefile
@@ -33,19 +33,13 @@ $(driver): $(obj) $(xerces_c.l) $(ace.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options) $(ace.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
---generate-insertion ACE_OutputCDR \
---generate-extraction ACE_InputCDR
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-insertion ACE_OutputCDR \
+--generate-extraction ACE_InputCDR
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -72,6 +66,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/binary/polymorphic/makefile b/tests/cxx/tree/binary/polymorphic/makefile
index 7a4c667..bcd1f96 100644
--- a/tests/cxx/tree/binary/polymorphic/makefile
+++ b/tests/cxx/tree/binary/polymorphic/makefile
@@ -33,20 +33,13 @@ $(driver): $(obj) $(xerces_c.l) $(ace.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options) $(ace.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
---generate-insertion ACE_OutputCDR \
---generate-extraction ACE_InputCDR \
---generate-polymorphic --root-element-last
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-polymorphic --root-element-last \
+--generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -73,6 +66,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/binary/xdr/makefile b/tests/cxx/tree/binary/xdr/makefile
index 23cde6b..4a2e0e2 100644
--- a/tests/cxx/tree/binary/xdr/makefile
+++ b/tests/cxx/tree/binary/xdr/makefile
@@ -29,18 +29,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
---generate-insertion XDR --generate-extraction XDR
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-insertion XDR --generate-extraction XDR
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -67,6 +61,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/built-in/makefile b/tests/cxx/tree/built-in/makefile
index 028d18d..023d583 100644
--- a/tests/cxx/tree/built-in/makefile
+++ b/tests/cxx/tree/built-in/makefile
@@ -30,23 +30,21 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --char-type char \
- --generate-inline \
- --generate-ostream \
- --generate-serialization \
- --generate-default-ctor \
- --generate-from-base-ctor \
- --root-element-all
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(src_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
+
+$(gen): xsd := $(out_root)/xsd/xsd
+
+$(gen): xsd_options := \
+--char-type char \
+--generate-inline \
+--generate-ostream \
+--generate-serialization \
+--generate-default-ctor \
+--generate-from-base-ctor \
+--root-element-all
+
+$(gen): $(src_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -80,6 +78,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/chameleon/makefile b/tests/cxx/tree/chameleon/makefile
index bd7aa2c..4b379b2 100644
--- a/tests/cxx/tree/chameleon/makefile
+++ b/tests/cxx/tree/chameleon/makefile
@@ -30,18 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --root-element root \
---generate-ostream
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --root-element root --generate-ostream
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -68,6 +62,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/comparison/makefile b/tests/cxx/tree/comparison/makefile
index ac4ad8c..79466b0 100644
--- a/tests/cxx/tree/comparison/makefile
+++ b/tests/cxx/tree/comparison/makefile
@@ -30,17 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-comparison
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-comparison
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -67,6 +62,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/compilation/makefile b/tests/cxx/tree/compilation/makefile
index fcb6e15..a4f768a 100644
--- a/tests/cxx/tree/compilation/makefile
+++ b/tests/cxx/tree/compilation/makefile
@@ -30,17 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-serialization
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-serialization
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -67,6 +62,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/complex/ctor/makefile b/tests/cxx/tree/complex/ctor/makefile
index 4894a6f..e8537c5 100644
--- a/tests/cxx/tree/complex/ctor/makefile
+++ b/tests/cxx/tree/complex/ctor/makefile
@@ -30,19 +30,13 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-default-ctor \
---generate-from-base-ctor --generate-doxygen --generate-polymorphic \
---generate-comparison
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-default-ctor --generate-from-base-ctor \
+--generate-doxygen --generate-polymorphic --generate-comparison
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -69,6 +63,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/containment/makefile b/tests/cxx/tree/containment/makefile
index e29e93a..b9c5384 100644
--- a/tests/cxx/tree/containment/makefile
+++ b/tests/cxx/tree/containment/makefile
@@ -30,17 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options :=
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options :=
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -67,6 +62,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/default/makefile b/tests/cxx/tree/default/makefile
index 209c283..b683121 100644
--- a/tests/cxx/tree/default/makefile
+++ b/tests/cxx/tree/default/makefile
@@ -30,19 +30,13 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-ostream \
---generate-serialization --generate-default-ctor --generate-from-base-ctor \
---omit-default-attributes
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-ostream --generate-serialization \
+--generate-default-ctor --generate-from-base-ctor --omit-default-attributes
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -69,6 +63,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/encoding/char/lcp/makefile b/tests/cxx/tree/encoding/char/lcp/makefile
index 8560e92..61c6562 100644
--- a/tests/cxx/tree/encoding/char/lcp/makefile
+++ b/tests/cxx/tree/encoding/char/lcp/makefile
@@ -30,17 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd -DXSD_USE_LCP
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-serialization
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-serialization
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -67,6 +62,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/encoding/char/utf-8/makefile b/tests/cxx/tree/encoding/char/utf-8/makefile
index 0aa5884..240ba88 100644
--- a/tests/cxx/tree/encoding/char/utf-8/makefile
+++ b/tests/cxx/tree/encoding/char/utf-8/makefile
@@ -30,18 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-serialization \
---generate-doxygen
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-serialization --generate-doxygen
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -68,6 +62,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/encoding/wchar/makefile b/tests/cxx/tree/encoding/wchar/makefile
index bf2e57d..eb9efe7 100644
--- a/tests/cxx/tree/encoding/wchar/makefile
+++ b/tests/cxx/tree/encoding/wchar/makefile
@@ -30,18 +30,13 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-serialization \
---generate-doxygen --char-type wchar_t
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-serialization --generate-doxygen \
+--char-type wchar_t
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -68,6 +63,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/enumeration/ctor/makefile b/tests/cxx/tree/enumeration/ctor/makefile
index 3ea7b8e..90a05a2 100644
--- a/tests/cxx/tree/enumeration/ctor/makefile
+++ b/tests/cxx/tree/enumeration/ctor/makefile
@@ -30,18 +30,13 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-default-ctor \
---generate-from-base-ctor --generate-doxygen
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-default-ctor --generate-from-base-ctor \
+--generate-doxygen
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -68,6 +63,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/enumeration/inheritance/makefile b/tests/cxx/tree/enumeration/inheritance/makefile
index 0af9733..46bdc3e 100644
--- a/tests/cxx/tree/enumeration/inheritance/makefile
+++ b/tests/cxx/tree/enumeration/inheritance/makefile
@@ -30,17 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-ostream
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-ostream
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -67,6 +62,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/float/makefile b/tests/cxx/tree/float/makefile
index a847ad5..ed6f717 100644
--- a/tests/cxx/tree/float/makefile
+++ b/tests/cxx/tree/float/makefile
@@ -30,17 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-serialization --root-element-all
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-serialization --root-element-all
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -67,6 +62,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/list/ctor/makefile b/tests/cxx/tree/list/ctor/makefile
index 1a002ae..8c91851 100644
--- a/tests/cxx/tree/list/ctor/makefile
+++ b/tests/cxx/tree/list/ctor/makefile
@@ -30,18 +30,13 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-default-ctor \
---generate-from-base-ctor --generate-doxygen
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-default-ctor --generate-from-base-ctor \
+--generate-doxygen
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -68,6 +63,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/name-clash/inheritance/makefile b/tests/cxx/tree/name-clash/inheritance/makefile
index aea6a21..36bdf5b 100644
--- a/tests/cxx/tree/name-clash/inheritance/makefile
+++ b/tests/cxx/tree/name-clash/inheritance/makefile
@@ -30,17 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-ostream
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-ostream
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -67,6 +62,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/naming/camel/makefile b/tests/cxx/tree/naming/camel/makefile
index c308a41..0f9f812 100644
--- a/tests/cxx/tree/naming/camel/makefile
+++ b/tests/cxx/tree/naming/camel/makefile
@@ -30,13 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
+$(gen): xsd := $(out_root)/xsd/xsd
+
+$(gen): xsd_options := \
--type-naming ucc \
--function-naming lcc \
--generate-ostream \
@@ -44,9 +43,7 @@ $(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
--generate-comparison \
--generate-wildcard
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -73,6 +70,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/naming/java/makefile b/tests/cxx/tree/naming/java/makefile
index d9258c7..1081877 100644
--- a/tests/cxx/tree/naming/java/makefile
+++ b/tests/cxx/tree/naming/java/makefile
@@ -30,13 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
+$(gen): xsd := $(out_root)/xsd/xsd
+
+$(gen): xsd_options := \
--type-naming java \
--function-naming java \
--generate-ostream \
@@ -44,9 +43,7 @@ $(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
--generate-comparison \
--generate-wildcard
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -73,6 +70,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/naming/knr/makefile b/tests/cxx/tree/naming/knr/makefile
index 3b92d37..b1a5a93 100644
--- a/tests/cxx/tree/naming/knr/makefile
+++ b/tests/cxx/tree/naming/knr/makefile
@@ -30,13 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
+$(gen): xsd := $(out_root)/xsd/xsd
+
+$(gen): xsd_options := \
--type-naming knr \
--function-naming knr \
--generate-ostream \
@@ -44,9 +43,7 @@ $(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
--generate-comparison \
--generate-wildcard
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -73,6 +70,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/polymorphism/comparison/makefile b/tests/cxx/tree/polymorphism/comparison/makefile
index 1568b9c..0faf6c3 100644
--- a/tests/cxx/tree/polymorphism/comparison/makefile
+++ b/tests/cxx/tree/polymorphism/comparison/makefile
@@ -30,18 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-polymorphic \
---generate-comparison
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-polymorphic --generate-comparison
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -68,6 +62,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/polymorphism/ostream/makefile b/tests/cxx/tree/polymorphism/ostream/makefile
index 2631035..e407267 100644
--- a/tests/cxx/tree/polymorphism/ostream/makefile
+++ b/tests/cxx/tree/polymorphism/ostream/makefile
@@ -30,18 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-polymorphic \
---generate-ostream
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-polymorphic --generate-ostream
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -69,6 +63,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/polymorphism/same-type/makefile b/tests/cxx/tree/polymorphism/same-type/makefile
index d255131..853e6aa 100644
--- a/tests/cxx/tree/polymorphism/same-type/makefile
+++ b/tests/cxx/tree/polymorphism/same-type/makefile
@@ -30,18 +30,13 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-ostream \
---generate-polymorphic --root-element root
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-ostream --generate-polymorphic \
+--root-element root
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -68,6 +63,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/prefix/makefile b/tests/cxx/tree/prefix/makefile
index 858925a..654632e 100644
--- a/tests/cxx/tree/prefix/makefile
+++ b/tests/cxx/tree/prefix/makefile
@@ -30,7 +30,8 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-gen := $(addprefix $(out_base)/,$(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx))
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
$(gen): xsd := $(out_root)/xsd/xsd
$(gen): xsd_options := --generate-serialization --generate-polymorphic \
@@ -62,6 +63,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/test-template/makefile b/tests/cxx/tree/test-template/makefile
index 7dceb17..518bc90 100644
--- a/tests/cxx/tree/test-template/makefile
+++ b/tests/cxx/tree/test-template/makefile
@@ -30,17 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-ostream
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-ostream
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -67,6 +62,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/types-only/makefile b/tests/cxx/tree/types-only/makefile
index 5d55225..725e4c8 100644
--- a/tests/cxx/tree/types-only/makefile
+++ b/tests/cxx/tree/types-only/makefile
@@ -30,17 +30,12 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --suppress-parsing
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --suppress-parsing
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -67,6 +62,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/union/ctor/makefile b/tests/cxx/tree/union/ctor/makefile
index 13f1ae8..bef734c 100644
--- a/tests/cxx/tree/union/ctor/makefile
+++ b/tests/cxx/tree/union/ctor/makefile
@@ -30,18 +30,13 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-default-ctor \
---generate-from-base-ctor --generate-doxygen
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-default-ctor --generate-from-base-ctor \
+--generate-doxygen
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -68,6 +63,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/tests/cxx/tree/wildcard/makefile b/tests/cxx/tree/wildcard/makefile
index 6d5eb83..8ca738f 100644
--- a/tests/cxx/tree/wildcard/makefile
+++ b/tests/cxx/tree/wildcard/makefile
@@ -30,19 +30,13 @@ $(driver): $(obj) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xerces_c.l.cpp-options)
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := --generate-wildcard \
---generate-default-ctor --generate-from-base-ctor \
---generate-serialization --generate-comparison
-
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-wildcard --generate-default-ctor \
+--generate-from-base-ctor --generate-serialization --generate-comparison
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -69,6 +63,17 @@ $(clean): $(driver).o.clean \
$(addsuffix .cxx.clean,$(dep)) \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#