From 871082dc018815261b6ec75a8e4933505389ffae Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 29 Apr 2014 08:29:49 +0200 Subject: Support for autotools and VC++ 9, 10, 11 build systems --- Makefile.am | 11 + bootstrap | 17 ++ configure.ac | 85 ++++++ examples/Makefile.am | 6 + examples/examples-vc10.sln | 15 + examples/examples-vc11.sln | 15 + examples/examples-vc9.sln | 15 + examples/makefile | 28 +- examples/roundtrip/driver.cxx | 2 +- examples/roundtrip/makefile | 23 +- examples/template/Makefile.am | 13 + examples/template/template-vc10.vcxproj | 167 +++++++++++ examples/template/template-vc10.vcxproj.filters | 20 ++ examples/template/template-vc11.vcxproj | 171 +++++++++++ examples/template/template-vc11.vcxproj.filters | 20 ++ examples/template/template-vc9.vcproj | 352 +++++++++++++++++++++++ examples/test.bat | 74 +++++ libstudxml-vc10.sln | 26 ++ libstudxml-vc11.sln | 26 ++ libstudxml-vc9.sln | 26 ++ libstudxml.pc.in | 15 + m4/diff.m4 | 54 ++++ m4/disable-rpath.m4 | 25 ++ m4/libexpat.m4 | 39 +++ m4/libtool-link.m4 | 46 +++ m4/pkgconfig.m4 | 12 + m4/static-lib.m4 | 18 ++ makefile | 9 +- tester.bat | 68 +++++ tester.in | 44 +++ tests/Makefile.am | 6 + tests/makefile | 18 ++ tests/parser/driver.cxx | 22 +- tests/parser/makefile | 25 +- tests/roundtrip/driver.cxx | 2 +- tests/roundtrip/makefile | 35 ++- tests/serializer/driver.cxx | 8 +- tests/serializer/makefile | 23 +- tests/template/Makefile.am | 15 + tests/template/template-vc10.vcxproj | 167 +++++++++++ tests/template/template-vc10.vcxproj.filters | 20 ++ tests/template/template-vc11.vcxproj | 171 +++++++++++ tests/template/template-vc11.vcxproj.filters | 20 ++ tests/template/template-vc9.vcproj | 352 +++++++++++++++++++++++ tests/test.bat | 74 +++++ tests/tests-vc10.sln | 15 + tests/tests-vc11.sln | 15 + tests/tests-vc9.sln | 15 + xml/Makefile.am | 24 ++ xml/libstudxml-vc10.vcxproj | 175 ++++++++++++ xml/libstudxml-vc10.vcxproj.filters | 24 ++ xml/libstudxml-vc11.vcxproj | 179 ++++++++++++ xml/libstudxml-vc11.vcxproj.filters | 24 ++ xml/libstudxml-vc9.vcproj | 360 ++++++++++++++++++++++++ xml/makefile | 5 +- 55 files changed, 3200 insertions(+), 36 deletions(-) create mode 100644 Makefile.am create mode 100755 bootstrap create mode 100644 configure.ac create mode 100644 examples/Makefile.am create mode 100644 examples/examples-vc10.sln create mode 100644 examples/examples-vc11.sln create mode 100644 examples/examples-vc9.sln create mode 100644 examples/template/Makefile.am create mode 100644 examples/template/template-vc10.vcxproj create mode 100644 examples/template/template-vc10.vcxproj.filters create mode 100644 examples/template/template-vc11.vcxproj create mode 100644 examples/template/template-vc11.vcxproj.filters create mode 100644 examples/template/template-vc9.vcproj create mode 100644 examples/test.bat create mode 100644 libstudxml-vc10.sln create mode 100644 libstudxml-vc11.sln create mode 100644 libstudxml-vc9.sln create mode 100644 libstudxml.pc.in create mode 100644 m4/diff.m4 create mode 100644 m4/disable-rpath.m4 create mode 100644 m4/libexpat.m4 create mode 100644 m4/libtool-link.m4 create mode 100644 m4/pkgconfig.m4 create mode 100644 m4/static-lib.m4 create mode 100644 tester.bat create mode 100755 tester.in create mode 100644 tests/Makefile.am create mode 100644 tests/template/Makefile.am create mode 100644 tests/template/template-vc10.vcxproj create mode 100644 tests/template/template-vc10.vcxproj.filters create mode 100644 tests/template/template-vc11.vcxproj create mode 100644 tests/template/template-vc11.vcxproj.filters create mode 100644 tests/template/template-vc9.vcproj create mode 100644 tests/test.bat create mode 100644 tests/tests-vc10.sln create mode 100644 tests/tests-vc11.sln create mode 100644 tests/tests-vc9.sln create mode 100644 xml/Makefile.am create mode 100644 xml/libstudxml-vc10.vcxproj create mode 100644 xml/libstudxml-vc10.vcxproj.filters create mode 100644 xml/libstudxml-vc11.vcxproj create mode 100644 xml/libstudxml-vc11.vcxproj.filters create mode 100644 xml/libstudxml-vc9.vcproj diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..5a33815 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,11 @@ +# file : Makefile.am +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +SUBDIRS = __path__(dirs) +dist_doc_DATA = __file__(docs) +EXTRA_DIST = __file__(extra_dist) +ACLOCAL_AMFLAGS = -I m4 + +pkgconfigdir = @pkgconfigdir@ +pkgconfig_DATA= libstudxml.pc diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..6f3b59e --- /dev/null +++ b/bootstrap @@ -0,0 +1,17 @@ +#! /bin/sh + +# file : bootstrap +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +# +# Bootstrap the automake build system. +# + +rm -f config.cache + +if test ! -d m4; then + mkdir m4 +fi + +autoreconf --install diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..8fa55e0 --- /dev/null +++ b/configure.ac @@ -0,0 +1,85 @@ +# file : configure.ac +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +AC_PREREQ(2.60) +AC_INIT([libstudxml], [__value__(version)], [studxml-users@codesynthesis.com]) +AC_CONFIG_AUX_DIR([config]) +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_SRCDIR([xml/exception.hxx]) + +AM_INIT_AUTOMAKE([-Wall -Werror foreign nostdinc subdir-objects dist-bzip2 dist-zip tar-ustar]) +m4_equote()[m4_ifdef]m4_dquote()([AM_PROG_AR], [AM_PROG_AR]) # Required by automake 1.12. + +LT_INIT([win32-dll]) + +AC_CANONICAL_HOST + +# Check for diff. +# +DIFF_TOOL + +# Check for C++ compiler and use it to compile the tests. +# +AC_PROG_CXX +AC_LANG(C++) + +# Create the libtool executable so that we can use it in further tests. +# +LT_OUTPUT + +# Check if we need to use external Expat. +# +AC_MSG_CHECKING([if we should use external expat]) + +AC_ARG_WITH( + [external-expat], + [AC_HELP_STRING([--with-external-expat],[use external expat instead of the internal subset])], + [external_expat=${withval}], + [external_expat=no]) + +if test x"$external_expat" != xno; then + AC_MSG_RESULT([yes]) + + # Check if we have Expat. + # + expat_found=yes + LIBEXPAT([],[expat_found=no]) + + if test x"$expat_found" = xno; then + AC_MSG_ERROR([expat is not found; consider using CPPFLAGS/LDFLAGS to specify its location]) + fi + + AC_DEFINE([LIBSTUDXML_EXTERNAL_EXPAT], [1], [Use external expat.]) +else + AC_MSG_RESULT([no]) +fi + +AM_CONDITIONAL([LIBSTUDXML_EXTERNAL_EXPAT], [test x"$external_expat" != xno]) + +# If we have internal Expat, then determine the byteorder. +# +if test x"$external_expat" = xno; then + AC_C_BIGENDIAN([byteorder=4321], [byteorder=1234]) + AC_DEFINE_UNQUOTED([LIBSTUDXML_BYTEORDER], [$byteorder], [1234 = little, 4321 = big]) +fi + +# Define LIBSTUDXML_STATIC_LIB if we are build static library on certain +# platforms. +# +STATIC_LIB([LIBSTUDXML_STATIC_LIB], [Static library interface.]) + +# Allow the user to specify the pkgconfig directory. +# +PKGCONFIG + +# Check if we should disable rpath. +# +DISABLE_RPATH + +# Output. +# +AC_CONFIG_HEADERS([xml/config.h xml/details/config.h]) +AC_CONFIG_FILES([ __path__(config_files)]) +AC_CONFIG_COMMANDS([tester-mode], [chmod +x tester]) +AC_OUTPUT diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 index 0000000..d417a2c --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1,6 @@ +# file : examples/Makefile.am +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +SUBDIRS = __path__(dirs) +EXTRA_DIST = __file__(extra_dist) diff --git a/examples/examples-vc10.sln b/examples/examples-vc10.sln new file mode 100644 index 0000000..9a5dc32 --- /dev/null +++ b/examples/examples-vc10.sln @@ -0,0 +1,15 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +__projects__ +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution +__solution_configurations__ + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +__project_configurations__ + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/examples/examples-vc11.sln b/examples/examples-vc11.sln new file mode 100644 index 0000000..436eeea --- /dev/null +++ b/examples/examples-vc11.sln @@ -0,0 +1,15 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +__projects__ +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution +__solution_configurations__ + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +__project_configurations__ + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/examples/examples-vc9.sln b/examples/examples-vc9.sln new file mode 100644 index 0000000..2ec9432 --- /dev/null +++ b/examples/examples-vc9.sln @@ -0,0 +1,15 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +__projects__ +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution +__solution_configurations__ + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +__project_configurations__ + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/examples/makefile b/examples/makefile index 3b9b68f..5f0ae68 100644 --- a/examples/makefile +++ b/examples/makefile @@ -4,14 +4,32 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make -tests := roundtrip +examples := roundtrip default := $(out_base)/ test := $(out_base)/.test +dist := $(out_base)/.dist 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 /,$(examples))) +$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(examples))) -$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile)) +$(dist): export dirs := $(examples) +$(dist): export extra_dist := test.bat examples-vc9.sln examples-vc10.sln \ +examples-vc11.sln +$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(examples))) + $(call meta-automake) + $(call meta-vc9sln,examples-vc9.sln) + $(call meta-vc10sln,examples-vc10.sln) + $(call meta-vc11sln,examples-vc11.sln) + $(call meta-vctest,examples-vc9.sln,test.bat) + +$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(examples))) + +$(call include,$(bld_root)/meta/vc9sln.make) +$(call include,$(bld_root)/meta/vc10sln.make) +$(call include,$(bld_root)/meta/vc11sln.make) +$(call include,$(bld_root)/meta/vctest.make) +$(call include,$(bld_root)/meta/automake.make) + +$(foreach t,$(examples),$(call import,$(src_base)/$t/makefile)) diff --git a/examples/roundtrip/driver.cxx b/examples/roundtrip/driver.cxx index 5270147..7c95538 100644 --- a/examples/roundtrip/driver.cxx +++ b/examples/roundtrip/driver.cxx @@ -91,7 +91,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/examples/roundtrip/makefile b/examples/roundtrip/makefile index fc7749c..89262ef 100644 --- a/examples/roundtrip/makefile +++ b/examples/roundtrip/makefile @@ -6,8 +6,6 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make cxx_tun := driver.cxx -# -# cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) cxx_od := $(cxx_obj:.o=.o.d) @@ -16,6 +14,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. @@ -29,6 +28,20 @@ $(call include-dep,$(cxx_od)) # $(out_base)/: $(driver) +# Dist +# +$(dist): name := $(subst $(src_root)/examples/,,$(src_base)) +$(dist): sources := $(cxx_tun) +$(dist): extras := README position.xml +$(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. # @@ -57,6 +70,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) diff --git a/examples/template/Makefile.am b/examples/template/Makefile.am new file mode 100644 index 0000000..64e4d1f --- /dev/null +++ b/examples/template/Makefile.am @@ -0,0 +1,13 @@ +# file : examples/template/Makefile.am +# copyright : not copyrighted - public domain + +EXTRA_DIST = __file__(extra_dist) + +noinst_PROGRAMS = driver +driver_SOURCES = driver.cxx __path__(extra_sources) __path__(extra_headers) +LDADD = $(top_builddir)/xml/libstudxml.la + +AM_CPPFLAGS = -I'$(top_builddir)' -I'$(top_srcdir)' + +TESTS=$(top_builddir)/tester +TESTS_ENVIRONMENT=example=1; export example; diff --git a/examples/template/template-vc10.vcxproj b/examples/template/template-vc10.vcxproj new file mode 100644 index 0000000..402aa6d --- /dev/null +++ b/examples/template/template-vc10.vcxproj @@ -0,0 +1,167 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {__uuid__()} + Win32Proj + __value__(name) + + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + false + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + + + + + + true + $(Configuration)\ + driver + + + true + $(Platform)\$(Configuration)\ + driver + + + false + $(Configuration)\ + driver + + + false + $(Platform)\$(Configuration)\ + driver + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(SolutionDir)\.. + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\lib\studxml-d.lib;%(AdditionalDependencies) + Console + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(SolutionDir)\.. + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\lib64\studxml-d.lib;%(AdditionalDependencies) + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(SolutionDir)\.. + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\lib\studxml.lib;%(AdditionalDependencies) + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(SolutionDir)\.. + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\lib64\studxml.lib;%(AdditionalDependencies) + Console + true + true + true + + + +__header_entries__(extra_headers) + + +__source_entry__(driver.cxx) +__source_entries__(extra_sources) + + + + + diff --git a/examples/template/template-vc10.vcxproj.filters b/examples/template/template-vc10.vcxproj.filters new file mode 100644 index 0000000..6d459fa --- /dev/null +++ b/examples/template/template-vc10.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + {__uuid__()} + cxx + + + {__uuid__()} + h;hxx;ixx;txx + + + +__header_filter_entries__(extra_headers) + + +__source_filter_entry__(driver.cxx) +__source_filter_entries__(extra_sources) + + diff --git a/examples/template/template-vc11.vcxproj b/examples/template/template-vc11.vcxproj new file mode 100644 index 0000000..095038b --- /dev/null +++ b/examples/template/template-vc11.vcxproj @@ -0,0 +1,171 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {__uuid__()} + Win32Proj + __value__(name) + + + + Application + true + v110 + Unicode + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + + + + + + + true + $(Configuration)\ + driver + + + true + $(Platform)\$(Configuration)\ + driver + + + false + $(Configuration)\ + driver + + + false + $(Platform)\$(Configuration)\ + driver + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(SolutionDir)\.. + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\lib\studxml-d.lib;%(AdditionalDependencies) + Console + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(SolutionDir)\.. + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\lib64\studxml-d.lib;%(AdditionalDependencies) + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(SolutionDir)\.. + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\lib\studxml.lib;%(AdditionalDependencies) + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(SolutionDir)\.. + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\lib64\studxml.lib;%(AdditionalDependencies) + Console + true + true + true + + + +__header_entries__(extra_headers) + + +__source_entry__(driver.cxx) +__source_entries__(extra_sources) + + + + + diff --git a/examples/template/template-vc11.vcxproj.filters b/examples/template/template-vc11.vcxproj.filters new file mode 100644 index 0000000..6d459fa --- /dev/null +++ b/examples/template/template-vc11.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + {__uuid__()} + cxx + + + {__uuid__()} + h;hxx;ixx;txx + + + +__header_filter_entries__(extra_headers) + + +__source_filter_entry__(driver.cxx) +__source_filter_entries__(extra_sources) + + diff --git a/examples/template/template-vc9.vcproj b/examples/template/template-vc9.vcproj new file mode 100644 index 0000000..c4a1d64 --- /dev/null +++ b/examples/template/template-vc9.vcproj @@ -0,0 +1,352 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +__source_entry__(driver.cxx) +__source_entries__(extra_sources) + + +__file_entries__(extra_headers) + + + + + diff --git a/examples/test.bat b/examples/test.bat new file mode 100644 index 0000000..013d820 --- /dev/null +++ b/examples/test.bat @@ -0,0 +1,74 @@ +@echo off +rem file : examples/test.bat +rem copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +rem license : MIT; see accompanying LICENSE file + +setlocal + +set "tests=__path__(dirs)" +set "confs=__path__(configurations)" +set "plats=__path__(platforms)" +set "curdir=%CD%" +set "topdir=%curdir%\.." +set "failed=" + +goto start + +rem +rem %1 - test directory +rem %2 - configuration +rem %3 - platform +rem +:run_test + cd %1 + + if "_%3_" == "_Win32_" ( + set "dir=%2" + ) else ( + set "dir=%3\%2" + ) + + if exist %dir%\driver.exe ( + echo %1\%3\%2 + call %topdir%\tester.bat example %2 %3 + if errorlevel 1 ( + set "failed=%failed% %1\%3\%2" + ) + ) + + cd %curdir% +goto :eof + +:start + +for %%t in (%tests%) do ( + for %%c in (%confs%) do ( + for %%p in (%plats%) do ( + call :run_test %%t %%c %%p + ) + ) +) + +if not "_%failed%_" == "__" goto error + +echo. +echo ALL EXAMPLES PASSED +echo. +goto end + +:usage +echo. +echo usage: test.bat +echo. + +:error +if not "_%failed%_" == "__" ( + echo. + for %%t in (%failed%) do echo FAILED: %%t + echo. +) +endlocal +exit /b 1 + +:end +endlocal diff --git a/libstudxml-vc10.sln b/libstudxml-vc10.sln new file mode 100644 index 0000000..0e065f4 --- /dev/null +++ b/libstudxml-vc10.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libstudxml", "xml\libstudxml-vc10.vcxproj", "{DCFCED35-A6E4-4554-948D-4A5E982D6824}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DCFCED35-A6E4-4554-948D-4A5E982D6824}.Debug|Win32.ActiveCfg = Debug|Win32 + {DCFCED35-A6E4-4554-948D-4A5E982D6824}.Debug|Win32.Build.0 = Debug|Win32 + {DCFCED35-A6E4-4554-948D-4A5E982D6824}.Debug|x64.ActiveCfg = Debug|x64 + {DCFCED35-A6E4-4554-948D-4A5E982D6824}.Debug|x64.Build.0 = Debug|x64 + {DCFCED35-A6E4-4554-948D-4A5E982D6824}.Release|Win32.ActiveCfg = Release|Win32 + {DCFCED35-A6E4-4554-948D-4A5E982D6824}.Release|Win32.Build.0 = Release|Win32 + {DCFCED35-A6E4-4554-948D-4A5E982D6824}.Release|x64.ActiveCfg = Release|x64 + {DCFCED35-A6E4-4554-948D-4A5E982D6824}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/libstudxml-vc11.sln b/libstudxml-vc11.sln new file mode 100644 index 0000000..eb17a7d --- /dev/null +++ b/libstudxml-vc11.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libstudxml", "xml\libstudxml-vc11.vcxproj", "{518885FE-EDEC-494D-A3FA-CBEAC9A7FCBB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {518885FE-EDEC-494D-A3FA-CBEAC9A7FCBB}.Debug|Win32.ActiveCfg = Debug|Win32 + {518885FE-EDEC-494D-A3FA-CBEAC9A7FCBB}.Debug|Win32.Build.0 = Debug|Win32 + {518885FE-EDEC-494D-A3FA-CBEAC9A7FCBB}.Debug|x64.ActiveCfg = Debug|x64 + {518885FE-EDEC-494D-A3FA-CBEAC9A7FCBB}.Debug|x64.Build.0 = Debug|x64 + {518885FE-EDEC-494D-A3FA-CBEAC9A7FCBB}.Release|Win32.ActiveCfg = Release|Win32 + {518885FE-EDEC-494D-A3FA-CBEAC9A7FCBB}.Release|Win32.Build.0 = Release|Win32 + {518885FE-EDEC-494D-A3FA-CBEAC9A7FCBB}.Release|x64.ActiveCfg = Release|x64 + {518885FE-EDEC-494D-A3FA-CBEAC9A7FCBB}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/libstudxml-vc9.sln b/libstudxml-vc9.sln new file mode 100644 index 0000000..3c6f54f --- /dev/null +++ b/libstudxml-vc9.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libstudxml", "xml\libstudxml-vc9.vcproj", "{93C99089-F2BB-4D66-9166-78002EC65C51}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {93C99089-F2BB-4D66-9166-78002EC65C51}.Debug|Win32.ActiveCfg = Debug|Win32 + {93C99089-F2BB-4D66-9166-78002EC65C51}.Debug|Win32.Build.0 = Debug|Win32 + {93C99089-F2BB-4D66-9166-78002EC65C51}.Debug|x64.ActiveCfg = Debug|x64 + {93C99089-F2BB-4D66-9166-78002EC65C51}.Debug|x64.Build.0 = Debug|x64 + {93C99089-F2BB-4D66-9166-78002EC65C51}.Release|Win32.ActiveCfg = Release|Win32 + {93C99089-F2BB-4D66-9166-78002EC65C51}.Release|Win32.Build.0 = Release|Win32 + {93C99089-F2BB-4D66-9166-78002EC65C51}.Release|x64.ActiveCfg = Release|x64 + {93C99089-F2BB-4D66-9166-78002EC65C51}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/libstudxml.pc.in b/libstudxml.pc.in new file mode 100644 index 0000000..ae19924 --- /dev/null +++ b/libstudxml.pc.in @@ -0,0 +1,15 @@ +# file : libstudxml.pc.in +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libstudxml +Description: C++ XML library +URL: http://www.codesynthesis.com/projects/libstudxml/ +Version: @VERSION@ +Libs: -L${libdir} -lstudxml +Cflags: -I${includedir} diff --git a/m4/diff.m4 b/m4/diff.m4 new file mode 100644 index 0000000..87b5d13 --- /dev/null +++ b/m4/diff.m4 @@ -0,0 +1,54 @@ +dnl file : m4/diff.m4 +dnl copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +dnl license : MIT; see accompanying LICENSE file +dnl +dnl DIFF_TOOL +dnl +AC_DEFUN([DIFF_TOOL], [ +diff_found=no + +AC_ARG_VAR([DIFF],[diff command]) +AC_ARG_VAR([DIFFFLAGS],[diff flags]) + +AC_ARG_WITH( + [diff], + [AC_HELP_STRING([--with-diff=PATH],[path to the diff program])], + [diff_path=${withval}], + [diff_path=]) + +AC_MSG_CHECKING([for diff]) + +if test x"$DIFF" = x; then + if test x"$diff_path" != x; then + AS_SET_CATFILE([abs_diff_path], [$ac_pwd], [$diff_path]) + DIFF="$abs_diff_path" + else + DIFF=diff + fi +fi + +cat >conftest.txt + +$DIFF conftest.txt conftest.txt 2>/dev/null 1>&2 + +if test x"$?" = x0; then + AC_MSG_RESULT([$DIFF]) +else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([diff command is not found; consider setting the DIFF variable or using --with-diff=PATH]) +fi + +AC_MSG_CHECKING([whether $DIFF accepts -u]) + +$DIFF -u conftest.txt conftest.txt 2>/dev/null 1>&2 + +if test x"$?" = x0; then + AC_MSG_RESULT([yes]) + DIFFFLAGS="$DIFFFLAGS -u" +else + AC_MSG_RESULT([no]) +fi + +rm -f conftest.txt + +])dnl diff --git a/m4/disable-rpath.m4 b/m4/disable-rpath.m4 new file mode 100644 index 0000000..68495b9 --- /dev/null +++ b/m4/disable-rpath.m4 @@ -0,0 +1,25 @@ +dnl file : m4/disable-rpath.m4 +dnl copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +dnl license : MIT; see accompanying LICENSE file +dnl +AC_DEFUN([DISABLE_RPATH],[ + +AC_MSG_CHECKING([whether to use rpath]) +AC_ARG_ENABLE( + [rpath], + [AC_HELP_STRING([--disable-rpath], [patch libtool to not use rpath])], + [libtool_rpath="$enable_rpath"], + [libtool_rpath="yes"]) +AC_MSG_RESULT($libtool_rpath) + +# Patch libtool to not use rpath if requested. +# +AC_CONFIG_COMMANDS( + [libtool-rpath-patch], + [if test "$libtool_use_rpath" = "no"; then + sed < libtool > libtool-2 's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_NO_RPATH__ "/' + mv libtool-2 libtool + chmod 755 libtool + fi], + [libtool_use_rpath=$libtool_rpath]) +])dnl diff --git a/m4/libexpat.m4 b/m4/libexpat.m4 new file mode 100644 index 0000000..67a9132 --- /dev/null +++ b/m4/libexpat.m4 @@ -0,0 +1,39 @@ +dnl file : m4/libexpat.m4 +dnl copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +dnl license : MIT; see accompanying LICENSE file +dnl +dnl LIBEXPAT([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +dnl +dnl +AC_DEFUN([LIBEXPAT], [ +libexpat_found=no + +AC_MSG_CHECKING([for expat]) + +save_LIBS="$LIBS" +LIBS="-lexpat $LIBS" + +CXX_LIBTOOL_LINK_IFELSE([ +AC_LANG_SOURCE([ +#include + +int +main () +{ + XML_Parser p (XML_ParserCreateNS (0, XML_Char (' '))); + XML_ParserFree (p); +} +])], +[ +libexpat_found=yes +]) + +if test x"$libexpat_found" = xyes; then + AC_MSG_RESULT([yes]) + [$1] +else + LIBS="$save_LIBS" + AC_MSG_RESULT([no]) + [$2] +fi +])dnl diff --git a/m4/libtool-link.m4 b/m4/libtool-link.m4 new file mode 100644 index 0000000..f02811f --- /dev/null +++ b/m4/libtool-link.m4 @@ -0,0 +1,46 @@ +dnl file : m4/libtool-link.m4 +dnl copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +dnl license : MIT; see accompanying LICENSE file +dnl +dnl +dnl CXX_LIBTOOL_LINK_IFELSE (input, [action-if-true], [action-if-false]) +dnl +dnl Similar to AC_LINK_IFELSE except it uses libtool to perform the +dnl linking and it does this using the C++ compiler. +dnl +AC_DEFUN([CXX_LIBTOOL_LINK_IFELSE],[ +AC_LANG_SAVE +AC_LANG(C++) + +if test -d .libs; then + delete_libs_dir=no +else + delete_libs_dir=yes +fi + +AC_COMPILE_IFELSE([$1], +[ + ac_try='./libtool --tag=CXX --mode=link $CXX -no-install $CXXFLAGS $LDFLAGS -o conftest conftest.$OBJEXT $LIBS >&AS_MESSAGE_LOG_FD' + if _AC_DO_VAR(ac_try); then + libtool_link_ok=yes + else + libtool_link_ok=no + fi +], +[ + libtool_link_ok=no +]) + +if test x"$delete_libs_dir" = xyes; then + rm -rf .libs +fi + +if test x"$libtool_link_ok" = xyes; then +[$2] +: +else +[$3] +: +fi + +AC_LANG_RESTORE])dnl diff --git a/m4/pkgconfig.m4 b/m4/pkgconfig.m4 new file mode 100644 index 0000000..59439fc --- /dev/null +++ b/m4/pkgconfig.m4 @@ -0,0 +1,12 @@ +dnl file : m4/pkgconfig.m4 +dnl copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +dnl license : MIT; see accompanying LICENSE file +dnl +AC_DEFUN([PKGCONFIG],[ +AC_ARG_WITH( + [pkgconfigdir], + [AC_HELP_STRING([--with-pkgconfigdir=DIR],[location of pkgconfig dir (default is libdir/pkgconfig)])], + [pkgconfigdir=${withval}], + [pkgconfigdir='${libdir}/pkgconfig']) +AC_SUBST([pkgconfigdir]) +])dnl diff --git a/m4/static-lib.m4 b/m4/static-lib.m4 new file mode 100644 index 0000000..802902a --- /dev/null +++ b/m4/static-lib.m4 @@ -0,0 +1,18 @@ +dnl file : m4/static-lib.m4 +dnl copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +dnl license : MIT; see accompanying LICENSE file +dnl +dnl STATIC_LIB(MACRO, DESCRIPTION) +dnl +dnl Define MACRO if we are on MinGW and are only building static library. +dnl +AC_DEFUN([STATIC_LIB], +[ +if test x$enable_shared = xno; then + case $host_os in + mingw*) + AC_DEFINE([$1], [1], [$2]) + ;; + esac +fi +])dnl diff --git a/makefile b/makefile index 790b65f..2798463 100644 --- a/makefile +++ b/makefile @@ -15,13 +15,14 @@ $(default): $(addprefix $(out_base)/,$(addsuffix /,$(dirs))) $(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(dirs))) $(dist): export dirs := $(dirs) -$(dist): export docs := LICENSE NEWS README INSTALL version -$(dist): data_dist := libstudxml-vc9.sln libstudxml-vc10.sln -$(dist): exec_dist := bootstrap +$(dist): export docs := LICENSE NEWS README INSTALL version tester.bat +$(dist): data_dist := libstudxml-vc9.sln libstudxml-vc10.sln \ +libstudxml-vc11.sln +$(dist): exec_dist := bootstrap tester.in $(dist): export extra_dist := $(data_dist) $(exec_dist) $(dist): export version = $(shell cat $(src_root)/version) -$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(dist_dirs))) +$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(dirs))) $(call dist-data,$(docs) $(data_dist) libstudxml.pc.in) $(call dist-exec,$(exec_dist)) $(call dist-dir,m4) diff --git a/tester.bat b/tester.bat new file mode 100644 index 0000000..b1d755b --- /dev/null +++ b/tester.bat @@ -0,0 +1,68 @@ +@echo off +rem file : tester.bat +rem copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +rem license : MIT; see accompanying LICENSE file + +rem +rem Run test or example. The test/example directory is the current directory. +rem +rem %1 "test" or "example" +rem %2 configuration, for example, Debug or Release +rem %3 platform, for example Win32 or x64 +rem topdir variable containing the path to top project directory +rem + +setlocal + +set "PATH=%topdir%\bin64;%topdir%\bin;%PATH%" + +if "_%DIFF%_" == "__" set DIFF=fc + +if "_%3_" == "_Win32_" ( + set "dir=%2" +) else ( + set "dir=%3\%2" +) + +rem Globbing returns files in alphabetic order. +rem +if exist *.xml ( + for %%f in (*.xml) do ( + + if "_%1_" == "_example_" ( + %dir%\driver.exe %%f + ) else ( + %dir%\driver.exe %%f >test.out + ) + + if errorlevel 1 ( + del /f test.out + goto error + ) + + if "_%1_" == "_test_" ( + + %DIFF% %%f test.out + + if errorlevel 1 ( + del /f test.out + goto error + ) + + del /f test.out + ) + ) +) else ( + + %dir%\driver.exe + if errorlevel 1 goto error +) + +goto end + +:error +endlocal +exit /b 1 + +:end +endlocal diff --git a/tester.in b/tester.in new file mode 100755 index 0000000..13d396e --- /dev/null +++ b/tester.in @@ -0,0 +1,44 @@ +#! /bin/sh + +# file : tester.in +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +# +# Run test or example. The test driver is in the current directory. +# The data files, if any, are in $srcdir. If $example is set, then +# we are testing an example and no output verification is required. +# + +# Globbing returns files in alphabetic order. +# +files=`echo $srcdir/*.xml` + +if test "$files" != "$srcdir/*.xml"; then + for f in $files; do + echo ./driver $f + + if test -n "$example"; then + ./driver $f + else + ./driver $f >test.out + fi + + if test $? -ne 0; then + rm -f test.out + exit 1 + fi + + if test -z "$example"; then + @DIFF@ @DIFFFLAGS@ $f test.out + r=$? + rm -f test.out + if test $r -ne 0; then + exit 1 + fi + fi + done +else + echo ./driver + ./driver +fi diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..b6eaad8 --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,6 @@ +# file : tests/Makefile.am +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +SUBDIRS = __path__(dirs) +EXTRA_DIST = __file__(extra_dist) diff --git a/tests/makefile b/tests/makefile index 5baca3a..fb0821c 100644 --- a/tests/makefile +++ b/tests/makefile @@ -8,10 +8,28 @@ tests := parser serializer roundtrip default := $(out_base)/ test := $(out_base)/.test +dist := $(out_base)/.dist clean := $(out_base)/.clean $(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests))) $(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests))) + +$(dist): export dirs := $(tests) +$(dist): export extra_dist := test.bat tests-vc9.sln tests-vc10.sln \ +tests-vc11.sln +$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(tests))) + $(call meta-automake) + $(call meta-vc9sln,tests-vc9.sln) + $(call meta-vc10sln,tests-vc10.sln) + $(call meta-vc11sln,tests-vc11.sln) + $(call meta-vctest,tests-vc9.sln,test.bat) + $(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests))) +$(call include,$(bld_root)/meta/vc9sln.make) +$(call include,$(bld_root)/meta/vc10sln.make) +$(call include,$(bld_root)/meta/vc11sln.make) +$(call include,$(bld_root)/meta/vctest.make) +$(call include,$(bld_root)/meta/automake.make) + $(foreach t,$(tests),$(call import,$(src_base)/$t/makefile)) diff --git a/tests/parser/driver.cxx b/tests/parser/driver.cxx index e949ad0..bdad9bf 100644 --- a/tests/parser/driver.cxx +++ b/tests/parser/driver.cxx @@ -2,6 +2,10 @@ // copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file +#ifdef NDEBUG +# error tests require enabled assert(); un-define the NDEBUG macro +#endif + #include #include #include @@ -28,7 +32,7 @@ main () p.next (); assert (false); } - catch (const xml::exception& e) + catch (const xml::exception&) { // cerr << e.what () << endl; } @@ -43,7 +47,7 @@ main () p.next (); assert (false); } - catch (const ios_base::failure& e) + catch (const ios_base::failure&) { } @@ -63,7 +67,7 @@ main () p.next_expect (parser::end_element); assert (false); } - catch (const xml::exception& e) + catch (const xml::exception&) { // cerr << e.what () << endl; } @@ -75,7 +79,7 @@ main () p.next_expect (parser::start_element, "root1"); assert (false); } - catch (const xml::exception& e) + catch (const xml::exception&) { // cerr << e.what () << endl; } @@ -127,7 +131,7 @@ main () p.next_expect (parser::end_element); assert (false); } - catch (const xml::exception& e) + catch (const xml::exception&) { // cerr << e.what () << endl; } @@ -140,7 +144,7 @@ main () p.attribute ("a"); assert (false); } - catch (const xml::exception& e) + catch (const xml::exception&) { // cerr << e.what () << endl; } @@ -220,7 +224,7 @@ main () p.next (); assert (false); } - catch (const xml::exception& e) + catch (const xml::exception&) { // cerr << e.what () << endl; } @@ -249,7 +253,7 @@ main () p.next (); assert (false); } - catch (const xml::exception& e) + catch (const xml::exception&) { // cerr << e.what () << endl; } @@ -302,7 +306,7 @@ main () p.next (); assert (false); } - catch (const xml::exception& e) + catch (const xml::exception&) { // cerr << e.what () << endl; } diff --git a/tests/parser/makefile b/tests/parser/makefile index 965266e..8b97633 100644 --- a/tests/parser/makefile +++ b/tests/parser/makefile @@ -6,8 +6,6 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make cxx_tun := driver.cxx -# -# cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) cxx_od := $(cxx_obj:.o=.o.d) @@ -16,6 +14,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,14 +22,26 @@ 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) +# Dist +# +$(dist): name := $(subst $(src_root)/tests/,,$(src_base)) +$(dist): sources := $(cxx_tun) +$(dist): export extra_dist := $(name)-vc9.vcproj \ +$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ +$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters +$(dist): + $(call dist-data,$(sources)) + $(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. # @@ -60,6 +71,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) 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) diff --git a/tests/serializer/driver.cxx b/tests/serializer/driver.cxx index 8d8fad1..b112d1b 100644 --- a/tests/serializer/driver.cxx +++ b/tests/serializer/driver.cxx @@ -2,6 +2,10 @@ // copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file +#ifdef NDEBUG +# error tests require enabled assert(); un-define the NDEBUG macro +#endif + #include #include #include @@ -25,7 +29,7 @@ main () s.attribute ("foo", "bar"); assert (false); } - catch (const xml::exception& e) + catch (const xml::exception&) { // cerr << e.what () << endl; } @@ -42,7 +46,7 @@ main () s.characters ("two"); assert (false); } - catch (const ios_base::failure& e) + catch (const ios_base::failure&) { } diff --git a/tests/serializer/makefile b/tests/serializer/makefile index 5ff27e4..bf21b7f 100644 --- a/tests/serializer/makefile +++ b/tests/serializer/makefile @@ -16,6 +16,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,14 +24,26 @@ 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) +# Dist +# +$(dist): name := $(subst $(src_root)/tests/,,$(src_base)) +$(dist): sources := $(cxx_tun) +$(dist): export extra_dist := $(name)-vc9.vcproj \ +$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ +$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters +$(dist): + $(call dist-data,$(sources)) + $(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. # @@ -60,6 +73,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) diff --git a/tests/template/Makefile.am b/tests/template/Makefile.am new file mode 100644 index 0000000..9d198f1 --- /dev/null +++ b/tests/template/Makefile.am @@ -0,0 +1,15 @@ +# file : tests/template/Makefile.am +# copyright : not copyrighted - public domain + +EXTRA_DIST = __file__(extra_dist) + +noinst_PROGRAMS = driver +driver_SOURCES = driver.cxx __path__(extra_sources) __path__(extra_headers) +LDADD = $(top_builddir)/xml/libstudxml.la + +AM_CPPFLAGS = -I'$(top_builddir)' -I'$(top_srcdir)' + +TESTS=$(top_builddir)/tester +TESTS_ENVIRONMENT=example=; export example; + +CLEANFILES = test.out diff --git a/tests/template/template-vc10.vcxproj b/tests/template/template-vc10.vcxproj new file mode 100644 index 0000000..f1849bd --- /dev/null +++ b/tests/template/template-vc10.vcxproj @@ -0,0 +1,167 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {__uuid__()} + Win32Proj + __value__(name) + + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + false + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + + + + + + true + $(Configuration)\ + driver + + + true + $(Platform)\$(Configuration)\ + driver + + + false + $(Configuration)\ + driver + + + false + $(Platform)\$(Configuration)\ + driver + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(SolutionDir)\.. + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\lib\studxml-d.lib;%(AdditionalDependencies) + Console + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(SolutionDir)\.. + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\lib64\studxml-d.lib;%(AdditionalDependencies) + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(SolutionDir)\.. + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\lib\studxml.lib;%(AdditionalDependencies) + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(SolutionDir)\.. + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\lib64\studxml.lib;%(AdditionalDependencies) + Console + true + true + true + + + +__header_entries__(extra_headers) + + +__source_entry__(driver.cxx) +__source_entries__(extra_sources) + + + + + diff --git a/tests/template/template-vc10.vcxproj.filters b/tests/template/template-vc10.vcxproj.filters new file mode 100644 index 0000000..6d459fa --- /dev/null +++ b/tests/template/template-vc10.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + {__uuid__()} + cxx + + + {__uuid__()} + h;hxx;ixx;txx + + + +__header_filter_entries__(extra_headers) + + +__source_filter_entry__(driver.cxx) +__source_filter_entries__(extra_sources) + + diff --git a/tests/template/template-vc11.vcxproj b/tests/template/template-vc11.vcxproj new file mode 100644 index 0000000..dd43663 --- /dev/null +++ b/tests/template/template-vc11.vcxproj @@ -0,0 +1,171 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {__uuid__()} + Win32Proj + __value__(name) + + + + Application + true + v110 + Unicode + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + + + + + + + true + $(Configuration)\ + driver + + + true + $(Platform)\$(Configuration)\ + driver + + + false + $(Configuration)\ + driver + + + false + $(Platform)\$(Configuration)\ + driver + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(SolutionDir)\.. + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\lib\studxml-d.lib;%(AdditionalDependencies) + Console + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(SolutionDir)\.. + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\lib64\studxml-d.lib;%(AdditionalDependencies) + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(SolutionDir)\.. + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\lib\studxml.lib;%(AdditionalDependencies) + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + $(SolutionDir)\.. + 4068;4355;4800;4290;%(DisableSpecificWarnings) + + + $(SolutionDir)\..\lib64\studxml.lib;%(AdditionalDependencies) + Console + true + true + true + + + +__header_entries__(extra_headers) + + +__source_entry__(driver.cxx) +__source_entries__(extra_sources) + + + + + diff --git a/tests/template/template-vc11.vcxproj.filters b/tests/template/template-vc11.vcxproj.filters new file mode 100644 index 0000000..6d459fa --- /dev/null +++ b/tests/template/template-vc11.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + {__uuid__()} + cxx + + + {__uuid__()} + h;hxx;ixx;txx + + + +__header_filter_entries__(extra_headers) + + +__source_filter_entry__(driver.cxx) +__source_filter_entries__(extra_sources) + + diff --git a/tests/template/template-vc9.vcproj b/tests/template/template-vc9.vcproj new file mode 100644 index 0000000..2a95903 --- /dev/null +++ b/tests/template/template-vc9.vcproj @@ -0,0 +1,352 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +__source_entry__(driver.cxx) +__source_entries__(extra_sources) + + +__file_entries__(extra_headers) + + + + + diff --git a/tests/test.bat b/tests/test.bat new file mode 100644 index 0000000..50e06d8 --- /dev/null +++ b/tests/test.bat @@ -0,0 +1,74 @@ +@echo off +rem file : tests/test.bat +rem copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +rem license : MIT; see accompanying LICENSE file + +setlocal + +set "tests=__path__(dirs)" +set "confs=__path__(configurations)" +set "plats=__path__(platforms)" +set "curdir=%CD%" +set "topdir=%curdir%\.." +set "failed=" + +goto start + +rem +rem %1 - test directory +rem %2 - configuration +rem %3 - platform +rem +:run_test + cd %1 + + if "_%3_" == "_Win32_" ( + set "dir=%2" + ) else ( + set "dir=%3\%2" + ) + + if exist %dir%\driver.exe ( + echo %1\%3\%2 + call %topdir%\tester.bat test %2 %3 + if errorlevel 1 ( + set "failed=%failed% %1\%3\%2" + ) + ) + + cd %curdir% +goto :eof + +:start + +for %%t in (%tests%) do ( + for %%c in (%confs%) do ( + for %%p in (%plats%) do ( + call :run_test %%t %%c %%p + ) + ) +) + +if not "_%failed%_" == "__" goto error + +echo. +echo ALL TESTS PASSED +echo. +goto end + +:usage +echo. +echo usage: test.bat +echo. + +:error +if not "_%failed%_" == "__" ( + echo. + for %%t in (%failed%) do echo FAILED: %%t + echo. +) +endlocal +exit /b 1 + +:end +endlocal diff --git a/tests/tests-vc10.sln b/tests/tests-vc10.sln new file mode 100644 index 0000000..9a5dc32 --- /dev/null +++ b/tests/tests-vc10.sln @@ -0,0 +1,15 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +__projects__ +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution +__solution_configurations__ + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +__project_configurations__ + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/tests/tests-vc11.sln b/tests/tests-vc11.sln new file mode 100644 index 0000000..436eeea --- /dev/null +++ b/tests/tests-vc11.sln @@ -0,0 +1,15 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +__projects__ +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution +__solution_configurations__ + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +__project_configurations__ + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/tests/tests-vc9.sln b/tests/tests-vc9.sln new file mode 100644 index 0000000..2ec9432 --- /dev/null +++ b/tests/tests-vc9.sln @@ -0,0 +1,15 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +__projects__ +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution +__solution_configurations__ + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +__project_configurations__ + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/xml/Makefile.am b/xml/Makefile.am new file mode 100644 index 0000000..433214e --- /dev/null +++ b/xml/Makefile.am @@ -0,0 +1,24 @@ +# file : xml/Makefile.am +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +EXTRA_DIST = __file__(extra_dist) + +studxmlincludedir = $(includedir)/xml + +lib_LTLIBRARIES = libstudxml.la +libstudxml_la_SOURCES = __path__(sources) + +nobase_studxmlinclude_HEADERS = __path__(headers) +nobase_nodist_studxmlinclude_HEADERS = details/config.h + +if !LIBSTUDXML_EXTERNAL_EXPAT +libstudxml_la_SOURCES += __path__(expat_sources) +nobase_studxmlinclude_HEADERS += __path__(expat_headers) +endif + +libstudxml_la_SOURCES += __path__(genx_sources) +nobase_studxmlinclude_HEADERS += __path__(genx_headers) + +AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -DLIBSTUDXML_DYNAMIC_LIB +AM_LDFLAGS = -release __value__(interface_version) -no-undefined diff --git a/xml/libstudxml-vc10.vcxproj b/xml/libstudxml-vc10.vcxproj new file mode 100644 index 0000000..5a49c39 --- /dev/null +++ b/xml/libstudxml-vc10.vcxproj @@ -0,0 +1,175 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {DCFCED35-A6E4-4554-948D-4A5E982D6824} + Win32Proj + libstudxml + + + + DynamicLibrary + true + Unicode + + + DynamicLibrary + true + Unicode + + + DynamicLibrary + false + true + Unicode + + + DynamicLibrary + false + true + Unicode + + + + + + + + + + + + + + + + + + + true + ..\bin\ + studxml-d-__value__(interface_version)-vc10 + + + true + ..\bin64\ + studxml-d-__value__(interface_version)-vc10 + + + false + ..\bin\ + studxml-__value__(interface_version)-vc10 + + + false + ..\bin64\ + studxml-__value__(interface_version)-vc10 + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;LIBSTUDXML_DYNAMIC_LIB;%(PreprocessorDefinitions) + .. + 4355;4800;4290;4251;%(DisableSpecificWarnings) + + + Windows + true + $(TargetPath) + ..\lib\studxml-d.lib + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;LIBSTUDXML_DYNAMIC_LIB;%(PreprocessorDefinitions) + .. + 4355;4800;4290;4251;%(DisableSpecificWarnings) + + + Windows + true + $(TargetPath) + ..\lib64\studxml-d.lib + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;LIBSTUDXML_DYNAMIC_LIB;%(PreprocessorDefinitions) + .. + 4355;4800;4290;4251;%(DisableSpecificWarnings) + + + Windows + true + true + true + $(TargetPath) + ..\lib\studxml.lib + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;LIBSTUDXML_DYNAMIC_LIB;%(PreprocessorDefinitions) + .. + 4355;4800;4290;4251;%(DisableSpecificWarnings) + + + Windows + true + true + true + $(TargetPath) + ..\lib64\studxml.lib + + + +__header_entries__(headers) +__header_entries__(expat_headers) +__header_entries__(genx_headers) +__header_entry__(details\config-vc.h) + + +__source_entries__(sources) +__source_entries__(expat_sources) +__source_entries__(genx_sources) + + + + + diff --git a/xml/libstudxml-vc10.vcxproj.filters b/xml/libstudxml-vc10.vcxproj.filters new file mode 100644 index 0000000..8f90e39 --- /dev/null +++ b/xml/libstudxml-vc10.vcxproj.filters @@ -0,0 +1,24 @@ + + + + + {51AEF41C-865B-40D5-89C8-151CE797B6C4} + c;cxx + + + {06415D1D-41F6-4BA3-A026-126239CCD920} + h;hxx;ixx;txx + + + +__header_filter_entries__(headers) +__header_filter_entries__(expat_headers) +__header_filter_entries__(genx_headers) +__header_filter_entry__(details\config-vc.h) + + +__source_filter_entries__(sources) +__source_filter_entries__(expat_sources) +__source_filter_entries__(genx_sources) + + diff --git a/xml/libstudxml-vc11.vcxproj b/xml/libstudxml-vc11.vcxproj new file mode 100644 index 0000000..54b59a2 --- /dev/null +++ b/xml/libstudxml-vc11.vcxproj @@ -0,0 +1,179 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {518885FE-EDEC-494D-A3FA-CBEAC9A7FCBB} + Win32Proj + libstudxml + + + + DynamicLibrary + true + v110 + Unicode + + + DynamicLibrary + true + v110 + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + + + + + + + + + + + + + + + + + true + ..\bin\ + studxml-d-__value__(interface_version)-vc11 + + + true + ..\bin64\ + studxml-d-__value__(interface_version)-vc11 + + + false + ..\bin\ + studxml-__value__(interface_version)-vc11 + + + false + ..\bin64\ + studxml-__value__(interface_version)-vc11 + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;LIBSTUDXML_DYNAMIC_LIB;%(PreprocessorDefinitions) + .. + 4355;4800;4290;4251;%(DisableSpecificWarnings) + + + Windows + true + $(TargetPath) + ..\lib\studxml-d.lib + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;LIBSTUDXML_DYNAMIC_LIB;%(PreprocessorDefinitions) + .. + 4355;4800;4290;4251;%(DisableSpecificWarnings) + + + Windows + true + $(TargetPath) + ..\lib64\studxml-d.lib + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;LIBSTUDXML_DYNAMIC_LIB;%(PreprocessorDefinitions) + .. + 4355;4800;4290;4251;%(DisableSpecificWarnings) + + + Windows + true + true + true + $(TargetPath) + ..\lib\studxml.lib + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;LIBSTUDXML_DYNAMIC_LIB;%(PreprocessorDefinitions) + .. + 4355;4800;4290;4251;%(DisableSpecificWarnings) + + + Windows + true + true + true + $(TargetPath) + ..\lib64\studxml.lib + + + +__header_entries__(headers) +__header_entries__(expat_headers) +__header_entries__(genx_headers) +__header_entry__(details\config-vc.h) + + +__source_entries__(sources) +__source_entries__(expat_sources) +__source_entries__(genx_sources) + + + + + diff --git a/xml/libstudxml-vc11.vcxproj.filters b/xml/libstudxml-vc11.vcxproj.filters new file mode 100644 index 0000000..9b77026 --- /dev/null +++ b/xml/libstudxml-vc11.vcxproj.filters @@ -0,0 +1,24 @@ + + + + + {8EC23642-5CC3-4086-92C9-AE14E512CA6C} + c;cxx + + + {8CB2105E-BD73-4B1B-8DCE-E1FCB9B4D894} + h;hxx;ixx;txx + + + +__header_filter_entries__(headers) +__header_filter_entries__(expat_headers) +__header_filter_entries__(genx_headers) +__header_filter_entry__(details\config-vc.h) + + +__source_filter_entries__(sources) +__source_filter_entries__(expat_sources) +__source_filter_entries__(genx_sources) + + diff --git a/xml/libstudxml-vc9.vcproj b/xml/libstudxml-vc9.vcproj new file mode 100644 index 0000000..5502ab7 --- /dev/null +++ b/xml/libstudxml-vc9.vcproj @@ -0,0 +1,360 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +__source_entries__(sources) +__source_entries__(expat_sources) +__source_entries__(genx_sources) + + +__file_entries__(headers) +__file_entries__(expat_headers) +__file_entries__(genx_headers) +__file_entry__(details\config-vc.h) + + + + + diff --git a/xml/makefile b/xml/makefile index 1447886..3e5ef87 100644 --- a/xml/makefile +++ b/xml/makefile @@ -81,7 +81,8 @@ $(dist): export headers := $(subst $(src_base)/,,$(shell find $(src_base) \ -name '*.hxx' -o -name '*.ixx' -o -name '*.txx')) $(dist): data_dist := details/config-vc.h $(expat_dist) $(genx_dist) $(dist): export extra_dist := $(data_dist) libstudxml-vc9.vcproj \ -libstudxml-vc10.vcxproj libstudxml-vc10.vcxproj.filters +libstudxml-vc10.vcxproj libstudxml-vc10.vcxproj.filters \ +libstudxml-vc11.vcxproj libstudxml-vc11.vcxproj.filters $(dist): export interface_version = $(shell sed -e \ 's/^\([0-9]*\.[0-9]*\).*/\1/' $(src_root)/version) @@ -91,6 +92,7 @@ $(dist): $(call dist-data,$(data_dist) details/config.h.in) $(call meta-vc9proj,libstudxml-vc9.vcproj) $(call meta-vc10proj,libstudxml-vc10.vcxproj) + $(call meta-vc10proj,libstudxml-vc11.vcxproj) $(call meta-automake) # Clean. @@ -120,6 +122,7 @@ $(call include,$(bld_root)/dist.make) $(call include,$(bld_root)/install.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)/c/c-o.make) -- cgit v1.1