aboutsummaryrefslogtreecommitdiff
path: root/tests/cxx/tree
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-09-17 18:56:22 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-09-17 18:56:22 +0200
commitc34af468acc94691d0a5954eae38a89506bc620e (patch)
tree828e27a83547c0c12fa54512e12285d680f805f3 /tests/cxx/tree
parentb3ede28237491c6c5ce2338d4f552d095f9430d6 (diff)
Generate .gitignore in compiler, test and example makefiles
Diffstat (limited to 'tests/cxx/tree')
-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
29 files changed, 484 insertions, 306 deletions
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.
#