summaryrefslogtreecommitdiff
path: root/tests/cxx/parser/validation/choice/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cxx/parser/validation/choice/makefile')
-rw-r--r--tests/cxx/parser/validation/choice/makefile23
1 files changed, 16 insertions, 7 deletions
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.
#