diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2009-10-20 10:50:22 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2009-10-20 10:50:22 +0200 |
commit | b135374d5e40df21871b3e0c9efc69ba2d8361cb (patch) | |
tree | 0f53bf8253ff16b7ce176f47b56e4ac879a768c6 /tests/cxx/hybrid/polymorphism | |
parent | 54ed525e5b8680e8737b7750fd73458d9ef1d30c (diff) |
Add tests to the distribution
The distribution makefiles for tests are automatically generated by
the build/dist script. nmakefiles are not yet generated.
Diffstat (limited to 'tests/cxx/hybrid/polymorphism')
-rw-r--r-- | tests/cxx/hybrid/polymorphism/makefile | 21 | ||||
-rw-r--r-- | tests/cxx/hybrid/polymorphism/multischema/makefile | 30 |
2 files changed, 38 insertions, 13 deletions
diff --git a/tests/cxx/hybrid/polymorphism/makefile b/tests/cxx/hybrid/polymorphism/makefile index 94bcc89..a1daa54 100644 --- a/tests/cxx/hybrid/polymorphism/makefile +++ b/tests/cxx/hybrid/polymorphism/makefile @@ -5,18 +5,27 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make -tests := +all_tests := multischema + +build_tests := ifeq ($(xsde_iostream),y) -tests += multischema +build_tests += multischema endif default := $(out_base)/ test := $(out_base)/.test +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win clean := $(out_base)/.clean -$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests))) -$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests))) -$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests))) +$(default): $(addprefix $(out_base)/,$(addsuffix /,$(build_tests))) +$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(build_tests))) +$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(all_tests))) +$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(all_tests))) -$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile)) +ifneq ($(filter $(MAKECMDGOALS),dist dist-win),) +$(foreach t,$(all_tests),$(call import,$(src_base)/$t/makefile)) +else +$(foreach t,$(build_tests),$(call import,$(src_base)/$t/makefile)) +endif diff --git a/tests/cxx/hybrid/polymorphism/multischema/makefile b/tests/cxx/hybrid/polymorphism/multischema/makefile index 96ce17f..1899fea 100644 --- a/tests/cxx/hybrid/polymorphism/multischema/makefile +++ b/tests/cxx/hybrid/polymorphism/multischema/makefile @@ -21,9 +21,11 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -test := $(out_base)/.test -clean := $(out_base)/.clean +driver := $(out_base)/driver +test := $(out_base)/.test +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -42,10 +44,11 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(out_root)/xsde/xsde $(gen): xsde := $(out_root)/xsde/xsde -$(gen): xsde_options += --generate-parser --generate-serializer \ ---generate-aggregate --generate-polymorphic --generate-typeinfo \ ---polymorphic-type base --polymorphic-schema $(src_base)/type.xsd \ ---include-regex '%.*/([^/]*)%$$$$1%' +$(gen): xsde_options += --include-regex '%.*/([^/]*)%$$$$1%' +$(gen) $(dist) $(dist-win): xsde_options += --generate-parser \ +--generate-serializer --generate-aggregate --generate-polymorphic \ +--generate-typeinfo --polymorphic-type base \ +--polymorphic-schema $(src_base)/type.xsd $(call include-dep,$(dep)) @@ -60,6 +63,19 @@ $(test): driver := $(driver) $(test): $(driver) $(src_base)/test-000.xml $(src_base)/test-000.std $(call message,test $$1,$$1 $(src_base)/test-000.xml | diff -u $(src_base)/test-000.std -,$(driver)) + +# Dist. +# +$(dist) $(dist-win): opt := -src $(src_base) -cmd cxx-hybrid -xsd "$(xsd)" \ +-cxx "$(cxx)" -gen "$(genf)" -opt "$(xsde_options)" -out $(dist_prefix) + +$(dist): + $(call message,install $(src_base),$(scf_root)/dist $(opt)) + +$(dist-win): + $(call message,install $(src_base),$(scf_root)/dist -win $(opt)) + + # Clean. # $(clean): $(driver).o.clean \ |