aboutsummaryrefslogtreecommitdiff
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
parentb3ede28237491c6c5ce2338d4f552d095f9430d6 (diff)
Generate .gitignore in compiler, test and example makefiles
-rw-r--r--examples/cxx/parser/generated/makefile26
-rw-r--r--examples/cxx/parser/hello/makefile20
-rw-r--r--examples/cxx/parser/library/makefile22
-rw-r--r--examples/cxx/parser/mixed/makefile22
-rw-r--r--examples/cxx/parser/mixin/makefile22
-rw-r--r--examples/cxx/parser/multiroot/makefile22
-rw-r--r--examples/cxx/parser/performance/makefile22
-rw-r--r--examples/cxx/parser/polymorphism/makefile22
-rw-r--r--examples/cxx/parser/polyroot/makefile22
-rw-r--r--examples/cxx/parser/wildcard/makefile20
-rw-r--r--examples/cxx/tree/binary/boost/makefile31
-rw-r--r--examples/cxx/tree/binary/cdr/makefile30
-rw-r--r--examples/cxx/tree/binary/xdr/makefile40
-rw-r--r--examples/cxx/tree/caching/makefile26
-rw-r--r--examples/cxx/tree/custom/calendar/makefile26
-rw-r--r--examples/cxx/tree/custom/comments/makefile26
-rw-r--r--examples/cxx/tree/custom/contacts/makefile26
-rw-r--r--examples/cxx/tree/custom/double/makefile26
-rw-r--r--examples/cxx/tree/custom/taxonomy/makefile26
-rw-r--r--examples/cxx/tree/custom/wildcard/makefile26
-rw-r--r--examples/cxx/tree/dbxml/makefile27
-rw-r--r--examples/cxx/tree/hello/makefile26
-rw-r--r--examples/cxx/tree/library/makefile29
-rw-r--r--examples/cxx/tree/messaging/makefile26
-rw-r--r--examples/cxx/tree/mixed/makefile26
-rw-r--r--examples/cxx/tree/multiroot/makefile26
-rw-r--r--examples/cxx/tree/performance/makefile27
-rw-r--r--examples/cxx/tree/polymorphism/makefile27
-rw-r--r--examples/cxx/tree/streaming/makefile29
-rw-r--r--examples/cxx/tree/wildcard/makefile28
-rw-r--r--examples/cxx/tree/xpath/makefile22
-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
-rw-r--r--xsd/makefile14
89 files changed, 1388 insertions, 682 deletions
diff --git a/examples/cxx/parser/generated/makefile b/examples/cxx/parser/generated/makefile
index 04d5831..031e59e 100644
--- a/examples/cxx/parser/generated/makefile
+++ b/examples/cxx/parser/generated/makefile
@@ -26,12 +26,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 \
@@ -56,6 +59,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/examples/cxx/parser/hello/makefile b/examples/cxx/parser/hello/makefile
index cfcee47..48f39d2 100644
--- a/examples/cxx/parser/hello/makefile
+++ b/examples/cxx/parser/hello/makefile
@@ -29,12 +29,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))
@@ -53,6 +52,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/examples/cxx/parser/library/makefile b/examples/cxx/parser/library/makefile
index c7f06c4..0d88942 100644
--- a/examples/cxx/parser/library/makefile
+++ b/examples/cxx/parser/library/makefile
@@ -29,13 +29,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-inline --type-map $(src_base)/library.map
-$(skel): $(out_root)/xsd/xsd $(src_base)/library.map
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-inline --type-map $(src_base)/library.map
+$(gen): $(out_root)/xsd/xsd $(src_base)/library.map
$(call include-dep,$(dep))
@@ -54,6 +53,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/examples/cxx/parser/mixed/makefile b/examples/cxx/parser/mixed/makefile
index 642e203..5da80ee 100644
--- a/examples/cxx/parser/mixed/makefile
+++ b/examples/cxx/parser/mixed/makefile
@@ -29,13 +29,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)/text.map
-$(skel): $(out_root)/xsd/xsd $(src_base)/text.map
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --type-map $(src_base)/text.map
+$(gen): $(out_root)/xsd/xsd $(src_base)/text.map
$(call include-dep,$(dep))
@@ -54,6 +53,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/examples/cxx/parser/mixin/makefile b/examples/cxx/parser/mixin/makefile
index 91030be..104db00 100644
--- a/examples/cxx/parser/mixin/makefile
+++ b/examples/cxx/parser/mixin/makefile
@@ -29,13 +29,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)/schema.map
-$(skel): $(out_root)/xsd/xsd $(src_base)/schema.map
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --type-map $(src_base)/schema.map
+$(gen): $(out_root)/xsd/xsd $(src_base)/schema.map
$(call include-dep,$(dep))
@@ -54,6 +53,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/examples/cxx/parser/multiroot/makefile b/examples/cxx/parser/multiroot/makefile
index cfe4fba..988ecbf 100644
--- a/examples/cxx/parser/multiroot/makefile
+++ b/examples/cxx/parser/multiroot/makefile
@@ -29,13 +29,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)/protocol.map
-$(skel): $(out_root)/xsd/xsd $(src_base)/protocol.map
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --type-map $(src_base)/protocol.map
+$(gen): $(out_root)/xsd/xsd $(src_base)/protocol.map
$(call include-dep,$(dep))
@@ -54,6 +53,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/examples/cxx/parser/performance/makefile b/examples/cxx/parser/performance/makefile
index 0a67a71..80e0e60 100644
--- a/examples/cxx/parser/performance/makefile
+++ b/examples/cxx/parser/performance/makefile
@@ -29,13 +29,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-inline
-$(skel): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options := --generate-inline
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -54,6 +53,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/examples/cxx/parser/polymorphism/makefile b/examples/cxx/parser/polymorphism/makefile
index 2c4054d..f53700b 100644
--- a/examples/cxx/parser/polymorphism/makefile
+++ b/examples/cxx/parser/polymorphism/makefile
@@ -29,13 +29,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))
@@ -54,6 +53,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/examples/cxx/parser/polyroot/makefile b/examples/cxx/parser/polyroot/makefile
index f1d6f08..a62465d 100644
--- a/examples/cxx/parser/polyroot/makefile
+++ b/examples/cxx/parser/polyroot/makefile
@@ -29,13 +29,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))
@@ -54,6 +53,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/examples/cxx/parser/wildcard/makefile b/examples/cxx/parser/wildcard/makefile
index 0d574ca..7345926 100644
--- a/examples/cxx/parser/wildcard/makefile
+++ b/examples/cxx/parser/wildcard/makefile
@@ -29,12 +29,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))
@@ -53,6 +52,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/examples/cxx/tree/binary/boost/makefile b/examples/cxx/tree/binary/boost/makefile
index f40c6d6..de332f8 100644
--- a/examples/cxx/tree/binary/boost/makefile
+++ b/examples/cxx/tree/binary/boost/makefile
@@ -33,21 +33,17 @@ $(driver): $(obj) $(xerces_c.l) $(boost_serialization.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd -I$(src_root)
$(obj) $(dep): $(xerces_c.l.cpp-options) $(boost_serialization.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-ostream \
+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-ostream \
--hxx-prologue-file $(src_base)/library-prologue.hxx \
---generate-insertion boost::archive::text_oarchive \
+--generate-insertion boost::archive::text_oarchive \
--generate-extraction boost::archive::text_iarchive
-$(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))
@@ -66,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/examples/cxx/tree/binary/cdr/makefile b/examples/cxx/tree/binary/cdr/makefile
index e811695..25e88e7 100644
--- a/examples/cxx/tree/binary/cdr/makefile
+++ b/examples/cxx/tree/binary/cdr/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-ostream \
---generate-insertion ACE_OutputCDR \
---generate-extraction ACE_InputCDR
-
-$(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-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -65,6 +58,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/examples/cxx/tree/binary/xdr/makefile b/examples/cxx/tree/binary/xdr/makefile
index 6414fe9..cd61637 100644
--- a/examples/cxx/tree/binary/xdr/makefile
+++ b/examples/cxx/tree/binary/xdr/makefile
@@ -14,39 +14,26 @@ dep := $(obj:.o=.o.d)
driver := $(out_base)/driver
clean := $(out_base)/.clean
-
# Import.
#
$(call import,\
$(scf_root)/import/libxerces-c/stub.make,\
l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-$(call import,\
- $(scf_root)/import/libace/stub.make,\
- l: ace.l,cpp-options: ace.l.cpp-options)
-
-
# Build.
#
-$(driver): $(obj) $(xerces_c.l) $(ace.l) -lnsl
+$(driver): $(obj) $(xerces_c.l) -lnsl
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options) $(ace.l.cpp-options)
+$(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-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-ostream \
+--generate-insertion XDR --generate-extraction XDR
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -65,6 +52,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/examples/cxx/tree/caching/makefile b/examples/cxx/tree/caching/makefile
index 2f4beaa..45587a9 100644
--- a/examples/cxx/tree/caching/makefile
+++ b/examples/cxx/tree/caching/makefile
@@ -29,17 +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 :=
-
-$(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))
@@ -58,6 +53,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/examples/cxx/tree/custom/calendar/makefile b/examples/cxx/tree/custom/calendar/makefile
index 36525aa..129333f 100644
--- a/examples/cxx/tree/custom/calendar/makefile
+++ b/examples/cxx/tree/custom/calendar/makefile
@@ -42,22 +42,19 @@ $(out_root)/xsd/xsd cxx-tree --output-dir $(out_base) --generate-xml-schema \
#
#
-$(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))
+
+$(gen): xsd := $(out_root)/xsd/xsd
# We have to double-escape '#' because the message function
# (which is used in command scripts) expands things twice.
#
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
+$(gen): xsd_options := \
--generate-inline \
--extern-xml-schema xml-schema.xsd
-$(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))
@@ -77,6 +74,17 @@ $(clean): $(driver).o.clean \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
$(call message,rm $$1,rm -f $$1,$(out_base)/xml-schema.hxx)
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver xml-schema.hxx $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/examples/cxx/tree/custom/comments/makefile b/examples/cxx/tree/custom/comments/makefile
index a12b3fe..f1074ec 100644
--- a/examples/cxx/tree/custom/comments/makefile
+++ b/examples/cxx/tree/custom/comments/makefile
@@ -38,20 +38,17 @@ $(out_root)/xsd/xsd cxx-tree --output-dir $(out_base) --generate-xml-schema \
#
#
-$(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 := \
--generate-inline \
--generate-serialization \
--extern-xml-schema xml-schema.xsd
-$(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))
@@ -71,6 +68,17 @@ $(clean): $(driver).o.clean \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
$(call message,rm $$1,rm -f $$1,$(out_base)/xml-schema.hxx)
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver xml-schema.hxx $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/examples/cxx/tree/custom/contacts/makefile b/examples/cxx/tree/custom/contacts/makefile
index 9a8dc89..d4ddbe5 100644
--- a/examples/cxx/tree/custom/contacts/makefile
+++ b/examples/cxx/tree/custom/contacts/makefile
@@ -29,23 +29,20 @@ $(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))
+
+$(gen): xsd := $(out_root)/xsd/xsd
# We have to double-escape '#' because the message function
# (which is used in command scripts) expands things twice.
#
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
+$(gen): xsd_options := \
--generate-inline \
--custom-type contact=/contact_base \
--hxx-epilogue '\\\#include "contacts-custom.hxx"'
-$(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))
@@ -64,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/examples/cxx/tree/custom/double/makefile b/examples/cxx/tree/custom/double/makefile
index 249ed01..e8bec43 100644
--- a/examples/cxx/tree/custom/double/makefile
+++ b/examples/cxx/tree/custom/double/makefile
@@ -35,18 +35,15 @@ $(out_root)/xsd/xsd cxx-tree --output-dir $(out_base) --generate-xml-schema \
--generate-serialization --custom-type double=double \
--hxx-epilogue '\#include "double-custom.hxx"' xml-schema.xsd)
-$(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 := \
--generate-serialization --extern-xml-schema xml-schema.xsd
-$(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))
@@ -66,6 +63,17 @@ $(clean): $(driver).o.clean \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
$(call message,rm $$1,rm -f $$1,$(out_base)/xml-schema.hxx)
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver xml-schema.hxx $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#
diff --git a/examples/cxx/tree/custom/taxonomy/makefile b/examples/cxx/tree/custom/taxonomy/makefile
index a5fa4a3..02ea144 100644
--- a/examples/cxx/tree/custom/taxonomy/makefile
+++ b/examples/cxx/tree/custom/taxonomy/makefile
@@ -29,16 +29,15 @@ $(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=-fwd.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
+
+$(gen): xsd := $(out_root)/xsd/xsd
# We have to double-escape '#' because the message function
# (which is used in command scripts) expands things twice.
#
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
+$(gen): xsd_options := \
--generate-inline \
--generate-forward \
--generate-polymorphic \
@@ -48,9 +47,7 @@ $(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
--fwd-prologue '\\\#include "people-custom-fwd.hxx"' \
--hxx-prologue '\\\#include "people-custom.hxx"'
-$(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))
@@ -69,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/examples/cxx/tree/custom/wildcard/makefile b/examples/cxx/tree/custom/wildcard/makefile
index 87f95ea..49c5306 100644
--- a/examples/cxx/tree/custom/wildcard/makefile
+++ b/examples/cxx/tree/custom/wildcard/makefile
@@ -29,25 +29,22 @@ $(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))
+
+$(gen): xsd := $(out_root)/xsd/xsd
# We have to double-escape '#' because the message function
# (which is used in command scripts) expands things twice.
#
-$(out_base)/$(xsd:.xsd=.hxx) \
-$(out_base)/$(xsd:.xsd=.ixx) \
-$(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
+$(gen): xsd_options := \
--generate-inline \
--generate-ostream \
--generate-serialization \
--custom-type data=/data_base \
--hxx-epilogue '\\\#include "wildcard-custom.hxx"'
-$(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))
@@ -66,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/examples/cxx/tree/dbxml/makefile b/examples/cxx/tree/dbxml/makefile
index 2a5ba4e..424a6b8 100644
--- a/examples/cxx/tree/dbxml/makefile
+++ b/examples/cxx/tree/dbxml/makefile
@@ -33,18 +33,12 @@ $(driver): $(obj) $(xerces_c.l) $(dbxml.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd -DDBXML_DOM
$(obj) $(dep): $(xerces_c.l.cpp-options) $(dbxml.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-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-serialization --generate-ostream
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -63,6 +57,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/examples/cxx/tree/hello/makefile b/examples/cxx/tree/hello/makefile
index 95288f5..6994941 100644
--- a/examples/cxx/tree/hello/makefile
+++ b/examples/cxx/tree/hello/makefile
@@ -29,17 +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 :=
-
-$(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))
@@ -58,6 +53,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/examples/cxx/tree/library/makefile b/examples/cxx/tree/library/makefile
index ceecbb2..83446c3 100644
--- a/examples/cxx/tree/library/makefile
+++ b/examples/cxx/tree/library/makefile
@@ -29,19 +29,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-inline \
- --generate-ostream \
- --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-inline --generate-ostream \
+--generate-serialization
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -60,6 +54,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/examples/cxx/tree/messaging/makefile b/examples/cxx/tree/messaging/makefile
index 2f4c7fe..7f7ced1 100644
--- a/examples/cxx/tree/messaging/makefile
+++ b/examples/cxx/tree/messaging/makefile
@@ -29,18 +29,15 @@ $(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-all \
+$(gen): xsd := $(out_root)/xsd/xsd
+
+$(gen): xsd_options := --root-element-all \
--generate-element-type --generate-element-map --generate-serialization
-$(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))
@@ -59,6 +56,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/examples/cxx/tree/mixed/makefile b/examples/cxx/tree/mixed/makefile
index cc81bca..b2e6338 100644
--- a/examples/cxx/tree/mixed/makefile
+++ b/examples/cxx/tree/mixed/makefile
@@ -29,17 +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 :=
-
-$(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))
@@ -59,6 +54,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/examples/cxx/tree/multiroot/makefile b/examples/cxx/tree/multiroot/makefile
index 37e2722..0a6be1f 100644
--- a/examples/cxx/tree/multiroot/makefile
+++ b/examples/cxx/tree/multiroot/makefile
@@ -29,17 +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 := --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 := --root-element-all
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -58,6 +53,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/examples/cxx/tree/performance/makefile b/examples/cxx/tree/performance/makefile
index f60e281..46cd783 100644
--- a/examples/cxx/tree/performance/makefile
+++ b/examples/cxx/tree/performance/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-inline --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-inline --generate-serialization
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -59,6 +53,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/examples/cxx/tree/polymorphism/makefile b/examples/cxx/tree/polymorphism/makefile
index f4e0b16..f9319d0 100644
--- a/examples/cxx/tree/polymorphism/makefile
+++ b/examples/cxx/tree/polymorphism/makefile
@@ -29,17 +29,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-polymorphic --generate-serialization --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 --generate-serialization \
+--root-element-last
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -59,6 +55,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/examples/cxx/tree/streaming/makefile b/examples/cxx/tree/streaming/makefile
index 0c478e0..f023af4 100644
--- a/examples/cxx/tree/streaming/makefile
+++ b/examples/cxx/tree/streaming/makefile
@@ -29,19 +29,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 \
- --suppress-parsing \
- --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 --suppress-parsing \
+--root-element-all
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -61,6 +55,17 @@ $(clean): $(driver).o.clean \
$(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
$(call message,rm $$1,rm -f $$1,$(out_base)/out.xml)
+# 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/examples/cxx/tree/wildcard/makefile b/examples/cxx/tree/wildcard/makefile
index 6a287e6..2e11468 100644
--- a/examples/cxx/tree/wildcard/makefile
+++ b/examples/cxx/tree/wildcard/makefile
@@ -29,18 +29,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-inline \
---generate-wildcard --generate-serialization --root-element message
-
-$(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-inline --generate-wildcard \
+--generate-serialization --root-element message
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -59,6 +54,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/examples/cxx/tree/xpath/makefile b/examples/cxx/tree/xpath/makefile
index 5e73cfb..a8ce9d9 100644
--- a/examples/cxx/tree/xpath/makefile
+++ b/examples/cxx/tree/xpath/makefile
@@ -33,13 +33,12 @@ $(driver): $(obj) $(xqilla.l) $(xerces_c.l)
$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
$(obj) $(dep): $(xqilla.l.cpp-options) $(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): $(out_root)/xsd/xsd
+$(gen): xsd := $(out_root)/xsd/xsd
+$(gen): xsd_options :=
+$(gen): $(out_root)/xsd/xsd
$(call include-dep,$(dep))
@@ -58,6 +57,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/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.
#
diff --git a/xsd/makefile b/xsd/makefile
index e09a737..af783cb 100644
--- a/xsd/makefile
+++ b/xsd/makefile
@@ -114,7 +114,7 @@ $(out_base)/: $(xsd)
$(install): $(xsd)
$(call install-exec,$<,$(install_bin_dir)/xsd)
-# clean
+# Clean.
#
.PHONY: $(clean)
@@ -123,8 +123,18 @@ $(clean): \
$(addsuffix .cxx.clean,$(cxx_obj)) \
$(addsuffix .cxx.clean,$(cxx_od))
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(xsd): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := xsd
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
-# how to
+# How to.
#
$(call include,$(bld_root)/cxx/o-e.make)
$(call include,$(bld_root)/cxx/cxx-o.make)