aboutsummaryrefslogtreecommitdiff
path: root/tests/cxx/tree/default/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cxx/tree/default/makefile')
-rw-r--r--tests/cxx/tree/default/makefile81
1 files changed, 8 insertions, 73 deletions
diff --git a/tests/cxx/tree/default/makefile b/tests/cxx/tree/default/makefile
index 431e708..a1055f9 100644
--- a/tests/cxx/tree/default/makefile
+++ b/tests/cxx/tree/default/makefile
@@ -5,79 +5,14 @@
include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-xsd := test.xsd
-cxx := driver.cxx
+tests := general omit
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
+default := $(out_base)/
+test := $(out_base)/.test
+clean := $(out_base)/.clean
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
+$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
+$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
+$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-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 --generate-serialization \
---generate-default-ctor --generate-from-base-ctor --omit-default-attributes
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(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.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
+$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))