aboutsummaryrefslogtreecommitdiff
path: root/tests/roundtrip
diff options
context:
space:
mode:
Diffstat (limited to 'tests/roundtrip')
-rw-r--r--tests/roundtrip/driver.cxx2
-rw-r--r--tests/roundtrip/makefile35
2 files changed, 31 insertions, 6 deletions
diff --git a/tests/roundtrip/driver.cxx b/tests/roundtrip/driver.cxx
index 904f5af..2e076c5 100644
--- a/tests/roundtrip/driver.cxx
+++ b/tests/roundtrip/driver.cxx
@@ -113,7 +113,7 @@ main (int argc, char* argv[])
}
}
}
- catch (const ios_base::failure& e)
+ catch (const ios_base::failure&)
{
cerr << "io failure" << endl;
return 1;
diff --git a/tests/roundtrip/makefile b/tests/roundtrip/makefile
index 4177057..00b78b8 100644
--- a/tests/roundtrip/makefile
+++ b/tests/roundtrip/makefile
@@ -6,6 +6,13 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
cxx_tun := driver.cxx
+tests := \
+attribute.xml \
+namespace.xml \
+followup-1.xml \
+followup-2.xml \
+characters.xml
+
#
#
cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o))
@@ -16,6 +23,7 @@ studxml.l.cpp-options := $(out_root)/xml/studxml.l.cpp-options
driver := $(out_base)/driver
test := $(out_base)/.test
+dist := $(out_base)/.dist
clean := $(out_base)/.clean
# Build.
@@ -23,20 +31,31 @@ clean := $(out_base)/.clean
$(driver): $(cxx_obj) $(studxml.l)
$(cxx_obj) $(cxx_od): $(studxml.l.cpp-options)
-
$(call include-dep,$(cxx_od))
-
# Alias for default target.
#
$(out_base)/: $(driver)
-# Test.
+# Dist
#
-$(test): tests := attribute.xml namespace.xml followup-1.xml followup-2.xml \
-characters.xml
+$(dist): name := $(subst $(src_root)/tests/,,$(src_base))
+$(dist): sources := $(cxx_tun)
+$(dist): extras := $(tests)
+$(dist): export extra_dist := $(extras) $(name)-vc9.vcproj \
+$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \
+$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters
+$(dist):
+ $(call dist-data,$(sources) $(extras))
+ $(call meta-automake,../template/Makefile.am)
+ $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj)
+ $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj)
+ $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj)
+# Test.
+#
+$(test): tests := $(tests)
$(test): test_body = $(call message,test $< $1,$< $(src_base)/$1 >$(out_base)/test.out)$(literal_newline)\
$(literal_tab)$(call message,,diff -u $(src_base)/$1 $(out_base)/test.out)$(literal_newline)\
$(literal_tab)$(call message,,rm -f $(out_base)/test.out)$(literal_newline)
@@ -65,6 +84,12 @@ endif
# How to.
#
+$(call include,$(bld_root)/dist.make)
+$(call include,$(bld_root)/meta/vc9proj.make)
+$(call include,$(bld_root)/meta/vc10proj.make)
+$(call include,$(bld_root)/meta/vc11proj.make)
+$(call include,$(bld_root)/meta/automake.make)
+
$(call include,$(bld_root)/cxx/o-e.make)
$(call include,$(bld_root)/cxx/cxx-o.make)
$(call include,$(bld_root)/cxx/cxx-d.make)