summaryrefslogtreecommitdiff
path: root/tests/cxx/parser/test-template
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/parser/test-template
parentb3ede28237491c6c5ce2338d4f552d095f9430d6 (diff)
Generate .gitignore in compiler, test and example makefiles
Diffstat (limited to 'tests/cxx/parser/test-template')
-rw-r--r--tests/cxx/parser/test-template/makefile20
1 files changed, 15 insertions, 5 deletions
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.
#