aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-09-08 21:23:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-09-08 21:23:37 +0200
commitff5bb2accee87c24ee64e8fdcf5169e674c4b7b4 (patch)
tree321a74c1f48331cb44e3b90943501646c5024836
parentb3b1fac433a20e5ab6abb3729ecc5473a658718b (diff)
Add suppor for VC++ build
-rw-r--r--build/bootstrap.make45
-rw-r--r--common/Makefile.am2
-rw-r--r--common/auto/driver.cxx2
-rw-r--r--common/auto/makefile21
-rw-r--r--common/common-vc10.sln15
-rw-r--r--common/common-vc9.sln15
-rw-r--r--common/lifecycle/driver.cxx2
-rw-r--r--common/lifecycle/makefile21
-rw-r--r--common/makefile11
-rw-r--r--common/query/driver.cxx2
-rw-r--r--common/query/makefile23
-rw-r--r--common/schema/driver.cxx2
-rw-r--r--common/schema/makefile21
-rw-r--r--common/template/Makefile.am6
-rw-r--r--common/template/driver.cxx2
-rw-r--r--common/template/makefile21
-rw-r--r--common/template/template-vc10.vcxproj173
-rw-r--r--common/template/template-vc10.vcxproj.filters24
-rw-r--r--common/template/template-vc9.vcproj356
-rw-r--r--common/test.bat48
-rw-r--r--common/threads/driver.cxx2
-rw-r--r--common/threads/makefile21
-rw-r--r--configure.ac2
-rw-r--r--libcommon/Makefile.am7
-rw-r--r--libcommon/common/Makefile.am12
-rw-r--r--libcommon/common/common.cxx (renamed from libcommon/common.cxx)8
-rw-r--r--libcommon/common/common.hxx (renamed from libcommon/common.hxx)10
-rw-r--r--libcommon/common/config.h.in (renamed from libcommon/config.h.in)8
-rw-r--r--libcommon/common/export.hxx (renamed from libcommon/export.hxx)10
-rw-r--r--libcommon/common/libcommon-vc10.vcxproj174
-rw-r--r--libcommon/common/libcommon-vc10.vcxproj.filters19
-rw-r--r--libcommon/common/libcommon-vc9.vcproj359
-rw-r--r--libcommon/common/makefile124
-rw-r--r--libcommon/common/options.cli (renamed from libcommon/options.cli)2
-rw-r--r--libcommon/common/options.cxx (renamed from libcommon/options.cxx)0
-rw-r--r--libcommon/common/options.hxx (renamed from libcommon/options.hxx)6
-rw-r--r--libcommon/common/options.ixx (renamed from libcommon/options.ixx)0
-rw-r--r--libcommon/libcommon-vc10.sln26
-rw-r--r--libcommon/libcommon-vc9.sln26
-rw-r--r--libcommon/makefile121
-rw-r--r--makefile2
-rw-r--r--mysql/Makefile.am1
-rw-r--r--mysql/makefile8
-rw-r--r--mysql/mysql-vc10.sln15
-rw-r--r--mysql/mysql-vc9.sln15
-rw-r--r--mysql/template/Makefile.am6
-rw-r--r--mysql/template/driver.cxx2
-rw-r--r--mysql/template/makefile25
-rw-r--r--mysql/template/template-vc10.vcxproj176
-rw-r--r--mysql/template/template-vc10.vcxproj.filters25
-rw-r--r--mysql/template/template-vc9.vcproj357
-rw-r--r--mysql/truncation/driver.cxx2
-rw-r--r--mysql/truncation/makefile25
-rw-r--r--mysql/types/driver.cxx4
-rw-r--r--mysql/types/makefile25
-rw-r--r--test.bat48
-rw-r--r--tester.bat54
-rwxr-xr-xtester.in3
-rw-r--r--tracer/Makefile.am1
-rw-r--r--tracer/makefile9
-rw-r--r--tracer/object/makefile15
-rw-r--r--tracer/template/Makefile.am4
-rw-r--r--tracer/template/makefile15
-rw-r--r--tracer/template/template-vc10.vcxproj172
-rw-r--r--tracer/template/template-vc10.vcxproj.filters25
-rw-r--r--tracer/template/template-vc9.vcproj353
-rw-r--r--tracer/tracer-vc10.sln15
-rw-r--r--tracer/tracer-vc9.sln15
-rw-r--r--tracer/transaction/makefile14
-rw-r--r--tracer/types/makefile15
70 files changed, 2966 insertions, 229 deletions
diff --git a/build/bootstrap.make b/build/bootstrap.make
index 59a62a2..8cff938 100644
--- a/build/bootstrap.make
+++ b/build/bootstrap.make
@@ -45,12 +45,53 @@ clean: $(out_base)/.clean
endif
-# Make sure the distribution prefix is set if the goal is dist.
+# Dist setup.
#
ifneq ($(filter $(MAKECMDGOALS),dist),)
+
+# Make sure the distribution prefix is set if the goal is dist.
+#
ifeq ($(dist_prefix),)
$(error dist_prefix is not set)
endif
+
+databases := mysql pgsql
+$(dist): databases := $(databases)
+
+# $1 project template without the -vcN.vc[x]proj suffix.
+# $2 project name without the -vcN.vc[x]proj suffix.
+#
+$(dist): meta-vc9projs = \
+$(foreach d,$(databases),$(call \
+meta-vc9proj,$1-vc9.vcproj,$(if $2,$2,$(notdir \
+$1))-$d-vc9.vcproj,database,$d)$(literal_newline)$(literal_tab))@:
+
+$(dist): meta-vc10projs = \
+$(foreach d,$(databases),$(call \
+meta-vc10proj,$1-vc10.vcxproj,$(if $2,$2,$(notdir \
+$1))-$d-vc10.vcxproj,database,$d)$(literal_newline)$(literal_tab))@:
+
+# $1 project name without the -vcN.vc[x]proj suffix.
+#
+vc9projs = $(addprefix $1-,$(addsuffix -vc9.vcproj,$(databases)))
+vc10projs = $(addprefix $1-,$(addsuffix -vc10.vcxproj,$(databases))) \
+$(addprefix $1-,$(addsuffix -vc10.vcxproj.filters,$(databases)))
+
+# $1 solution name without the -vcN.sln suffix.
+#
+$(dist): meta-vc9slns = \
+$(foreach d,$(databases),$(call \
+meta-vc9sln,$1-vc9.sln,$1-$d-vc9.sln,-$d-vc9.vcproj,database,$d)$(literal_newline)\
+$(literal_tab))@:
+
+$(dist): meta-vc10slns = \
+$(foreach d,$(databases),$(call \
+meta-vc10sln,$1-vc10.sln,$1-$d-vc10.sln,-$d-vc10.vcxproj,database,$d)$(literal_newline)\
+$(literal_tab))@:
+
+vc9slns = $(addprefix $1-,$(addsuffix -vc9.sln,$(databases)))
+vc10slns = $(addprefix $1-,$(addsuffix -vc10.sln,$(databases)))
+
endif
# If we don't have dependency auto-generation then we need to manually
@@ -74,7 +115,7 @@ endif
# Don't include dependency info for certain targets.
#
-ifneq ($(filter $(MAKECMDGOALS),clean disfigure),)
+ifneq ($(filter $(MAKECMDGOALS),clean disfigure dist),)
include-dep =
endif
diff --git a/common/Makefile.am b/common/Makefile.am
index a526e4c..00c4ef0 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -8,3 +8,5 @@ SUBDIRS = __path__(dirs)
if ODB_TESTS_THREADS
SUBDIRS += __path__(thread_dirs)
endif
+
+EXTRA_DIST = __file__(extra_dist)
diff --git a/common/auto/driver.cxx b/common/auto/driver.cxx
index 423254e..4a65725 100644
--- a/common/auto/driver.cxx
+++ b/common/auto/driver.cxx
@@ -13,7 +13,7 @@
#include <odb/database.hxx>
#include <odb/transaction.hxx>
-#include <common.hxx>
+#include <common/common.hxx>
#include "test.hxx"
#include "test-odb.hxx"
diff --git a/common/auto/makefile b/common/auto/makefile
index b39759a..e4cdffd 100644
--- a/common/auto/makefile
+++ b/common/auto/makefile
@@ -10,8 +10,8 @@ odb_hdr := test.hxx
cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o))
cxx_od := $(cxx_obj:.o=.o.d)
-common.l := $(out_root)/libcommon/common.l
-common.l.cpp-options := $(out_root)/libcommon/common.l.cpp-options
+common.l := $(out_root)/libcommon/common/common.l
+common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
driver := $(out_base)/driver
dist := $(out_base)/.dist
@@ -47,11 +47,20 @@ $(out_base)/: $(driver)
# Dist
#
-$(dist): data_dist := $(cxx_tun) $(odb_hdr) test.std
+name := $(notdir $(src_base))
+
$(dist): db_id := @database@
+$(dist): sources := $(cxx_tun)
+$(dist): headers := $(odb_hdr)
+$(dist): data_dist := test.std
+$(dist): export name := $(name)
+$(dist): export extra_dist := $(data_dist) $(call vc9projs,$(name)) \
+$(call vc10projs,$(name))
$(dist):
- $(call dist-data,$(data_dist))
- $(call meta-automake,$(src_root)/common/template/Makefile.am)
+ $(call dist-data,$(sources) $(headers) $(data_dist))
+ $(call meta-automake,../template/Makefile.am)
+ $(call meta-vc9projs,../template/template,$(name))
+ $(call meta-vc10projs,../template/template,$(name))
# Test.
#
@@ -82,6 +91,8 @@ 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/automake.make)
$(call include,$(odb_rules))
diff --git a/common/common-vc10.sln b/common/common-vc10.sln
new file mode 100644
index 0000000..9a5dc32
--- /dev/null
+++ b/common/common-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/common/common-vc9.sln b/common/common-vc9.sln
new file mode 100644
index 0000000..2ec9432
--- /dev/null
+++ b/common/common-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/common/lifecycle/driver.cxx b/common/lifecycle/driver.cxx
index ef5a4aa..a7be6d4 100644
--- a/common/lifecycle/driver.cxx
+++ b/common/lifecycle/driver.cxx
@@ -13,7 +13,7 @@
#include <odb/database.hxx>
#include <odb/transaction.hxx>
-#include <common.hxx>
+#include <common/common.hxx>
#include "test.hxx"
#include "test-odb.hxx"
diff --git a/common/lifecycle/makefile b/common/lifecycle/makefile
index 73cc2e4..b2a6875 100644
--- a/common/lifecycle/makefile
+++ b/common/lifecycle/makefile
@@ -10,8 +10,8 @@ odb_hdr := test.hxx
cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o))
cxx_od := $(cxx_obj:.o=.o.d)
-common.l := $(out_root)/libcommon/common.l
-common.l.cpp-options := $(out_root)/libcommon/common.l.cpp-options
+common.l := $(out_root)/libcommon/common/common.l
+common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
driver := $(out_base)/driver
dist := $(out_base)/.dist
@@ -47,11 +47,20 @@ $(out_base)/: $(driver)
# Dist
#
-$(dist): data_dist := $(cxx_tun) $(odb_hdr) test.std
+name := $(notdir $(src_base))
+
$(dist): db_id := @database@
+$(dist): sources := $(cxx_tun)
+$(dist): headers := $(odb_hdr)
+$(dist): data_dist := test.std
+$(dist): export name := $(name)
+$(dist): export extra_dist := $(data_dist) $(call vc9projs,$(name)) \
+$(call vc10projs,$(name))
$(dist):
- $(call dist-data,$(data_dist))
- $(call meta-automake,$(src_root)/common/template/Makefile.am)
+ $(call dist-data,$(sources) $(headers) $(data_dist))
+ $(call meta-automake,../template/Makefile.am)
+ $(call meta-vc9projs,../template/template,$(name))
+ $(call meta-vc10projs,../template/template,$(name))
# Test.
#
@@ -82,6 +91,8 @@ 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/automake.make)
$(call include,$(odb_rules))
diff --git a/common/makefile b/common/makefile
index ef085e9..f575f74 100644
--- a/common/makefile
+++ b/common/makefile
@@ -24,15 +24,24 @@ clean := $(out_base)/.clean
$(default): $(addprefix $(out_base)/,$(addsuffix /,$(build_tests)))
+name := $(notdir $(src_base))
+$(dist): name := $(name)
$(dist): export dirs := $(tests)
$(dist): export thread_dirs := $(thread_tests)
+$(dist): export extra_dist := $(call vc9slns,$(name)) $(call vc10slns,$(name))
$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(all_tests)))
$(call meta-automake)
+ $(call meta-vc9slns,$(name))
+ $(call meta-vc10slns,$(name))
+ $(call meta-vctest,$(name)-mysql-vc10.sln,test.bat)
$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(build_tests)))
$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(all_tests)))
-$(call include,$(bld_root)/dist.make)
+$(call include,$(bld_root)/meta/vc9sln.make)
+$(call include,$(bld_root)/meta/vc10sln.make)
+$(call include,$(bld_root)/meta/vctest.make)
+$(call include,$(bld_root)/meta/automake.make)
ifneq ($(filter $(MAKECMDGOALS),dist clean),)
$(foreach t,$(all_tests),$(call import,$(src_base)/$t/makefile))
diff --git a/common/query/driver.cxx b/common/query/driver.cxx
index 2573d7e..eede6d8 100644
--- a/common/query/driver.cxx
+++ b/common/query/driver.cxx
@@ -13,7 +13,7 @@
#include <odb/database.hxx>
#include <odb/transaction.hxx>
-#include <common.hxx>
+#include <common/common.hxx>
#include "test.hxx"
#include "test-odb.hxx"
diff --git a/common/query/makefile b/common/query/makefile
index 27e19e8..08eb33d 100644
--- a/common/query/makefile
+++ b/common/query/makefile
@@ -10,8 +10,8 @@ odb_hdr := test.hxx
cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o))
cxx_od := $(cxx_obj:.o=.o.d)
-common.l := $(out_root)/libcommon/common.l
-common.l.cpp-options := $(out_root)/libcommon/common.l.cpp-options
+common.l := $(out_root)/libcommon/common/common.l
+common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
driver := $(out_base)/driver
dist := $(out_base)/.dist
@@ -48,12 +48,21 @@ $(out_base)/: $(driver)
# Dist
#
-$(dist): data_dist := $(cxx_tun) $(odb_hdr) traits.hxx test.std
-$(dist): export extra_headers := traits.hxx
+name := $(notdir $(src_base))
+
$(dist): db_id := @database@
+$(dist): sources := $(cxx_tun)
+$(dist): headers := $(odb_hdr)
+$(dist): export extra_headers := traits.hxx
+$(dist): data_dist := test.std
+$(dist): export name := $(name)
+$(dist): export extra_dist := $(data_dist) $(call vc9projs,$(name)) \
+$(call vc10projs,$(name))
$(dist):
- $(call dist-data,$(data_dist))
- $(call meta-automake,$(src_root)/common/template/Makefile.am)
+ $(call dist-data,$(sources) $(headers) $(extra_headers) $(data_dist))
+ $(call meta-automake,../template/Makefile.am)
+ $(call meta-vc9projs,../template/template,$(name))
+ $(call meta-vc10projs,../template/template,$(name))
# Test.
#
@@ -84,6 +93,8 @@ 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/automake.make)
$(call include,$(odb_rules))
diff --git a/common/schema/driver.cxx b/common/schema/driver.cxx
index 2647d8c..e189b23 100644
--- a/common/schema/driver.cxx
+++ b/common/schema/driver.cxx
@@ -13,7 +13,7 @@
#include <odb/database.hxx>
#include <odb/transaction.hxx>
-#include <common.hxx>
+#include <common/common.hxx>
#include "test.hxx"
#include "test-odb.hxx"
diff --git a/common/schema/makefile b/common/schema/makefile
index de22c01..5c71905 100644
--- a/common/schema/makefile
+++ b/common/schema/makefile
@@ -10,8 +10,8 @@ odb_hdr := test.hxx
cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o))
cxx_od := $(cxx_obj:.o=.o.d)
-common.l := $(out_root)/libcommon/common.l
-common.l.cpp-options := $(out_root)/libcommon/common.l.cpp-options
+common.l := $(out_root)/libcommon/common/common.l
+common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
driver := $(out_base)/driver
dist := $(out_base)/.dist
@@ -47,11 +47,20 @@ $(out_base)/: $(driver)
# Dist
#
-$(dist): data_dist := $(cxx_tun) $(odb_hdr) test.std
+name := $(notdir $(src_base))
+
$(dist): db_id := @database@
+$(dist): sources := $(cxx_tun)
+$(dist): headers := $(odb_hdr)
+$(dist): data_dist := test.std
+$(dist): export name := $(name)
+$(dist): export extra_dist := $(data_dist) $(call vc9projs,$(name)) \
+$(call vc10projs,$(name))
$(dist):
- $(call dist-data,$(data_dist))
- $(call meta-automake,$(src_root)/common/template/Makefile.am)
+ $(call dist-data,$(sources) $(headers) $(data_dist))
+ $(call meta-automake,../template/Makefile.am)
+ $(call meta-vc9projs,../template/template,$(name))
+ $(call meta-vc10projs,../template/template,$(name))
# Test.
#
@@ -82,6 +91,8 @@ 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/automake.make)
$(call include,$(odb_rules))
diff --git a/common/template/Makefile.am b/common/template/Makefile.am
index b2fc122..ca3a3d5 100644
--- a/common/template/Makefile.am
+++ b/common/template/Makefile.am
@@ -3,13 +3,15 @@
# copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
+EXTRA_DIST = __file__(extra_dist)
+
noinst_PROGRAMS = driver
driver_SOURCES = driver.cxx __path__(extra_sources) __path__(extra_headers)
-driver_LDADD = $(top_builddir)/libcommon/libcommon.la
+driver_LDADD = $(top_builddir)/libcommon/common/libcommon.la
driver_CPPFLAGS = -I'$(top_builddir)/libcommon' -I'$(top_srcdir)/libcommon'
TESTS=$(top_builddir)/tester
-TESTS_ENVIRONMENT=top_builddir=$(top_builddir);
+TESTS_ENVIRONMENT=top_builddir=$(top_builddir); export top_builddir;
# ODB compilation.
#
diff --git a/common/template/driver.cxx b/common/template/driver.cxx
index 08e4196..495365b 100644
--- a/common/template/driver.cxx
+++ b/common/template/driver.cxx
@@ -13,7 +13,7 @@
#include <odb/database.hxx>
#include <odb/transaction.hxx>
-#include <common.hxx>
+#include <common/common.hxx>
#include "test.hxx"
#include "test-odb.hxx"
diff --git a/common/template/makefile b/common/template/makefile
index cdc8f91..cff4185 100644
--- a/common/template/makefile
+++ b/common/template/makefile
@@ -10,8 +10,8 @@ odb_hdr := test.hxx
cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o))
cxx_od := $(cxx_obj:.o=.o.d)
-common.l := $(out_root)/libcommon/common.l
-common.l.cpp-options := $(out_root)/libcommon/common.l.cpp-options
+common.l := $(out_root)/libcommon/common/common.l
+common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
driver := $(out_base)/driver
dist := $(out_base)/.dist
@@ -47,11 +47,20 @@ $(out_base)/: $(driver)
# Dist
#
-$(dist): data_dist := $(cxx_tun) $(odb_hdr) test.std
+name := $(notdir $(src_base))
+
$(dist): db_id := @database@
+$(dist): sources := $(cxx_tun)
+$(dist): headers := $(odb_hdr)
+$(dist): data_dist := test.std
+$(dist): export name := $(name)
+$(dist): export extra_dist := $(data_dist) $(call vc9projs,$(name)) \
+$(call vc10projs,$(name))
$(dist):
- $(call dist-data,$(data_dist))
- $(call meta-automake)
+ $(call dist-data,$(sources) $(headers) $(data_dist))
+ $(call meta-automake,../template/Makefile.am)
+ $(call meta-vc9projs,../template/template,$(name))
+ $(call meta-vc10projs,../template/template,$(name))
# Test.
#
@@ -82,6 +91,8 @@ 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/automake.make)
$(call include,$(odb_rules))
diff --git a/common/template/template-vc10.vcxproj b/common/template/template-vc10.vcxproj
new file mode 100644
index 0000000..5e1936f
--- /dev/null
+++ b/common/template/template-vc10.vcxproj
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{__uuid__()}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>__value__(name)</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(Configuration)\</OutDir>
+ <TargetName>driver</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <TargetName>driver</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ <OutDir>$(Configuration)\</OutDir>
+ <TargetName>driver</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <TargetName>driver</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\libcommon</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\libcommon\lib\common-d.lib;odb-__value__(database)-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\libcommon</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\libcommon\lib\common-d.lib;odb-__value__(database)-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\libcommon</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\libcommon\lib\common.lib;odb-__value__(database).lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\libcommon</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\libcommon\lib\common.lib;odb-__value__(database).lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+__custom_build_entry__(
+test.hxx,
+odb test.hxx,
+odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)))) test.hxx,
+test-odb.hxx;test-odb.ixx;test-odb.cxx)
+ </ItemGroup>
+ <ItemGroup>
+__header_entry__(test-odb.hxx)
+__header_entry__(test-odb.ixx)
+__header_entries__(extra_headers)
+ </ItemGroup>
+ <ItemGroup>
+__source_entry__(driver.cxx)
+__source_entry__(test-odb.cxx)
+__source_entries__(extra_sources)
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/common/template/template-vc10.vcxproj.filters b/common/template/template-vc10.vcxproj.filters
new file mode 100644
index 0000000..f3ee658
--- /dev/null
+++ b/common/template/template-vc10.vcxproj.filters
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{__uuid__()}</UniqueIdentifier>
+ <Extensions>cxx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{__uuid__()}</UniqueIdentifier>
+ <Extensions>h;hxx;ixx;txx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+__header_filter_entry__(test.hxx)
+__header_filter_entry__(test-odb.hxx)
+__header_filter_entry__(test-odb.ixx)
+__header_filter_entries__(extra_headers)
+ </ItemGroup>
+ <ItemGroup>
+__source_filter_entry__(driver.cxx)
+__source_filter_entry__(test-odb.cxx)
+__source_filter_entries__(extra_sources)
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/common/template/template-vc9.vcproj b/common/template/template-vc9.vcproj
new file mode 100644
index 0000000..0cf2bc4
--- /dev/null
+++ b/common/template/template-vc9.vcproj
@@ -0,0 +1,356 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="__value__(name)"
+ ProjectGUID="{__uuid__()}"
+ RootNamespace="__value__(name)"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\libcommon"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\libcommon\lib\common-d.lib;odb-__value__(database)-d.lib;odb-d.lib"
+ OutputFile="$(OutDir)\driver.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories="..\..\libcommon"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\libcommon\lib\common.lib;odb-__value__(database).lib;odb.lib"
+ OutputFile="$(OutDir)\driver.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\libcommon"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\libcommon\lib64\common-d.lib;odb-__value__(database)-d.lib;odb-d.lib"
+ OutputFile="$(OutDir)\driver.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories="..\..\libcommon"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\libcommon\lib64\common.lib;odb-__value__(database).lib;odb.lib"
+ OutputFile="$(OutDir)\driver.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cxx"
+ UniqueIdentifier="{__uuid__()}"
+ >
+__source_entry__(driver.cxx)
+__source_entry__(test-odb.cxx)
+__source_entries__(extra_sources)
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hxx;ixx;txx"
+ UniqueIdentifier="{__uuid__()}"
+ >
+__file_entry_custom_build__(
+test.hxx,
+odb test.hxx,
+odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)))) test.hxx,
+test-odb.hxx;test-odb.ixx;test-odb.cxx)
+__file_entry__(test-odb.hxx)
+__file_entry__(test-odb.ixx)
+__file_entries__(extra_headers)
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/common/test.bat b/common/test.bat
new file mode 100644
index 0000000..678e678
--- /dev/null
+++ b/common/test.bat
@@ -0,0 +1,48 @@
+@echo off
+rem file : common/test.bat
+rem author : Boris Kolpackov <boris@codesynthesis.com>
+rem copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+rem license : GNU GPL v2; see accompanying LICENSE file
+
+setlocal
+
+set "tests=__path__(dirs) __path__(thread_dirs)"
+set "confs=__path__(configurations)"
+set "topdir=__path__(topdir)\.."
+
+goto start
+
+:run_test
+ cd %1
+
+ if exist %2\driver.exe (
+ echo %1\%2
+ call %topdir%\tester.bat tracer %2
+ if errorlevel 1 (
+ set "failed=%failed% %1\%2"
+ )
+ )
+
+ cd ..
+goto :eof
+
+:start
+
+for %%t in (%tests%) do (
+ for %%c in (%confs%) do (
+ call :run_test %%t %%c
+ )
+)
+
+if not "_%failed%_" == "__" goto error
+
+echo ALL TESTS PASSED
+goto end
+
+:error
+for %%t in (%failed%) do echo FAILED: %%t
+exit /b 1
+goto end
+
+:end
+endlocal
diff --git a/common/threads/driver.cxx b/common/threads/driver.cxx
index c883bba..dd2d9f6 100644
--- a/common/threads/driver.cxx
+++ b/common/threads/driver.cxx
@@ -17,7 +17,7 @@
#include <odb/details/shared-ptr.hxx>
#include <odb/details/thread.hxx>
-#include <common.hxx>
+#include <common/common.hxx>
#include "test.hxx"
#include "test-odb.hxx"
diff --git a/common/threads/makefile b/common/threads/makefile
index 6a8c802..73174d9 100644
--- a/common/threads/makefile
+++ b/common/threads/makefile
@@ -10,8 +10,8 @@ odb_hdr := test.hxx
cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o))
cxx_od := $(cxx_obj:.o=.o.d)
-common.l := $(out_root)/libcommon/common.l
-common.l.cpp-options := $(out_root)/libcommon/common.l.cpp-options
+common.l := $(out_root)/libcommon/common/common.l
+common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
driver := $(out_base)/driver
dist := $(out_base)/.dist
@@ -48,11 +48,20 @@ $(out_base)/: $(driver)
# Dist
#
-$(dist): data_dist := $(cxx_tun) $(odb_hdr) test.std
+name := $(notdir $(src_base))
+
$(dist): db_id := @database@
+$(dist): sources := $(cxx_tun)
+$(dist): headers := $(odb_hdr)
+$(dist): data_dist := test.std
+$(dist): export name := $(name)
+$(dist): export extra_dist := $(data_dist) $(call vc9projs,$(name)) \
+$(call vc10projs,$(name))
$(dist):
- $(call dist-data,$(data_dist))
- $(call meta-automake,$(src_root)/common/template/Makefile.am)
+ $(call dist-data,$(sources) $(headers) $(data_dist))
+ $(call meta-automake,../template/Makefile.am)
+ $(call meta-vc9projs,../template/template,$(name))
+ $(call meta-vc10projs,../template/template,$(name))
# Test.
#
@@ -83,6 +92,8 @@ 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/automake.make)
$(call include,$(odb_rules))
diff --git a/configure.ac b/configure.ac
index bdc5afa..bb0932c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,7 +61,7 @@ STATIC_LIB([LIBCOMMON_STATIC_LIB], [Static library interface.])
# Output.
#
-AC_CONFIG_HEADERS([config.h libcommon/config.h])
+AC_CONFIG_HEADERS([config.h libcommon/common/config.h])
AC_CONFIG_FILES([__path__(config_files)])
AC_CONFIG_COMMANDS([tester-mode], [chmod +x tester])
AC_OUTPUT
diff --git a/libcommon/Makefile.am b/libcommon/Makefile.am
index d42cff2..e498e3b 100644
--- a/libcommon/Makefile.am
+++ b/libcommon/Makefile.am
@@ -3,10 +3,5 @@
# copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
-noinst_LTLIBRARIES = libcommon.la
-libcommon_la_SOURCES = __path__(sources) __path__(headers)
-
+SUBDIRS = __path__(dirs)
EXTRA_DIST = __file__(extra_dist)
-
-libcommon_la_CPPFLAGS= -I'$(builddir)' -I'$(srcdir)' -DLIBCOMMON_DYNAMIC_LIB
-libcommon_la_LDFLAGS = -no-undefined -rpath '$(libdir)'
diff --git a/libcommon/common/Makefile.am b/libcommon/common/Makefile.am
new file mode 100644
index 0000000..6712eaa
--- /dev/null
+++ b/libcommon/common/Makefile.am
@@ -0,0 +1,12 @@
+# file : libcommon/common/Makefile.am
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+# license : GNU GPL v2; see accompanying LICENSE file
+
+noinst_LTLIBRARIES = libcommon.la
+libcommon_la_SOURCES = __path__(sources) __path__(headers)
+
+EXTRA_DIST = __file__(extra_dist)
+
+libcommon_la_CPPFLAGS= -I'$(top_builddir)/libcommon' -I'$(top_srcdir)/libcommon' -DLIBCOMMON_DYNAMIC_LIB
+libcommon_la_LDFLAGS = -no-undefined -rpath '$(libdir)'
diff --git a/libcommon/common.cxx b/libcommon/common/common.cxx
index 0c88818..d68d579 100644
--- a/libcommon/common.cxx
+++ b/libcommon/common/common.cxx
@@ -1,4 +1,4 @@
-// file : libcommon/common.cxx
+// file : libcommon/common/common.cxx
// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
@@ -7,15 +7,15 @@
#include <iostream>
#ifndef _MSC_VER
-# include <config.h>
+# include <common/config.h>
#endif
#ifdef DB_ID_MYSQL
# include <odb/mysql/database.hxx>
#endif
-#include "common.hxx"
-#include "options.hxx"
+#include <common/common.hxx>
+#include <common/options.hxx>
using namespace std;
using namespace odb;
diff --git a/libcommon/common.hxx b/libcommon/common/common.hxx
index 411ece5..87b08f0 100644
--- a/libcommon/common.hxx
+++ b/libcommon/common/common.hxx
@@ -1,18 +1,18 @@
-// file : libcommon/common.hxx
+// file : libcommon/common/common.hxx
// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
-#ifndef LIBCOMMON_COMMON_HXX
-#define LIBCOMMON_COMMON_HXX
+#ifndef LIBCOMMON_COMMON_COMMON_HXX
+#define LIBCOMMON_COMMON_COMMON_HXX
#include <memory> // std::auto_ptr
#include <odb/database.hxx>
-#include <export.hxx>
+#include <common/export.hxx>
LIBCOMMON_EXPORT std::auto_ptr<odb::database>
create_database (int argc, char* argv[]);
-#endif // LIBCOMMON_COMMON_HXX
+#endif // LIBCOMMON_COMMON_COMMON_HXX
diff --git a/libcommon/config.h.in b/libcommon/common/config.h.in
index 9d18901..06318c4 100644
--- a/libcommon/config.h.in
+++ b/libcommon/common/config.h.in
@@ -1,4 +1,4 @@
-/* file : libcommon/config.h.in
+/* file : libcommon/common/config.h.in
* author : Boris Kolpackov <boris@codesynthesis.com>
* copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
* license : GNU GPL v2; see accompanying LICENSE file
@@ -6,10 +6,10 @@
/* This file is automatically processed by configure. */
-#ifndef LIBCOMMON_CONFIG_H
-#define LIBCOMMON_CONFIG_H
+#ifndef LIBCOMMON_COMMON_CONFIG_H
+#define LIBCOMMON_COMMON_CONFIG_H
#undef DB_ID_MYSQL
#undef LIBCOMMON_STATIC_LIB
-#endif /* LIBCOMMON_CONFIG_H */
+#endif /* LIBCOMMON_COMMON_CONFIG_H */
diff --git a/libcommon/export.hxx b/libcommon/common/export.hxx
index 8bbb96c..4ea2d33 100644
--- a/libcommon/export.hxx
+++ b/libcommon/common/export.hxx
@@ -1,13 +1,13 @@
-// file : libcommon/export.hxx
+// file : libcommon/common/export.hxx
// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
-#ifndef LIBCOMMON_EXPORT_HXX
-#define LIBCOMMON_EXPORT_HXX
+#ifndef LIBCOMMON_COMMON_EXPORT_HXX
+#define LIBCOMMON_COMMON_EXPORT_HXX
#ifndef _MSC_VER
-# include <config.h>
+# include <common/config.h>
#endif
#ifdef LIBCOMMON_STATIC_LIB
@@ -36,4 +36,4 @@
# endif
#endif
-#endif // LIBCOMMON_EXPORT_HXX
+#endif // LIBCOMMON_COMMON_EXPORT_HXX
diff --git a/libcommon/common/libcommon-vc10.vcxproj b/libcommon/common/libcommon-vc10.vcxproj
new file mode 100644
index 0000000..74d704b
--- /dev/null
+++ b/libcommon/common/libcommon-vc10.vcxproj
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{019C2E51-BF41-4490-AB96-4156741B8CC9}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>libcommon</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>..\bin\</OutDir>
+ <TargetName>common-d</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>..\bin64\</OutDir>
+ <TargetName>common-d</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ <OutDir>..\bin\</OutDir>
+ <TargetName>common</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ <OutDir>..\bin64\</OutDir>
+ <TargetName>common</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;__upcase__(db_id_)__upcase__(__value__(database));LIBCOMMON_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories>
+ <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>odb-__value__(database)-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <OutputFile>$(TargetPath)</OutputFile>
+ <ImportLibrary>..\lib\common-d.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;__upcase__(db_id_)__upcase__(__value__(database));LIBCOMMON_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories>
+ <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>odb-__value__(database)-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <OutputFile>$(TargetPath)</OutputFile>
+ <ImportLibrary>..\lib64\common-d.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;__upcase__(db_id_)__upcase__(__value__(database));LIBCOMMON_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories>
+ <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>odb-__value__(database).lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <OutputFile>$(TargetPath)</OutputFile>
+ <ImportLibrary>..\lib\common.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;__upcase__(db_id_)__upcase__(__value__(database));LIBCOMMON_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories>
+ <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>odb-__value__(database).lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <OutputFile>$(TargetPath)</OutputFile>
+ <ImportLibrary>..\lib64\common.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+__header_entries__(headers)
+ </ItemGroup>
+ <ItemGroup>
+__source_entries__(sources)
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/libcommon/common/libcommon-vc10.vcxproj.filters b/libcommon/common/libcommon-vc10.vcxproj.filters
new file mode 100644
index 0000000..ecc3613
--- /dev/null
+++ b/libcommon/common/libcommon-vc10.vcxproj.filters
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{6B7BDACA-0BDC-48B2-B5BD-BEFC5826ABC9}</UniqueIdentifier>
+ <Extensions>cxx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{F2B8743C-E39C-4FE0-AA8F-FF7FA2DA7191}</UniqueIdentifier>
+ <Extensions>h;hxx;ixx;txx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+__header_filter_entries__(headers)
+ </ItemGroup>
+ <ItemGroup>
+__source_filter_entries__(sources)
+ </ItemGroup>
+</Project>
diff --git a/libcommon/common/libcommon-vc9.vcproj b/libcommon/common/libcommon-vc9.vcproj
new file mode 100644
index 0000000..412480b
--- /dev/null
+++ b/libcommon/common/libcommon-vc9.vcproj
@@ -0,0 +1,359 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="libcommon"
+ ProjectGUID="{8575F058-1BD6-4F97-8901-83D0110C2B6B}"
+ RootNamespace="libcommon"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".."
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/wd4355 /wd4800 /wd4290"
+ Optimization="0"
+ AdditionalIncludeDirectories=".."
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;__upcase__(db_id_)__upcase__(__value__(database));LIBCOMMON_DYNAMIC_LIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ CommandLine="if not exist ..\lib mkdir ..\lib"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odb-__value__(database)-d.lib;odb-d.lib"
+ OutputFile="$(OutDir)\bin\common-d.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)\lib\common-d.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory=".."
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/wd4355 /wd4800 /wd4290"
+ Optimization="0"
+ AdditionalIncludeDirectories=".."
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;__upcase__(db_id_)__upcase__(__value__(database));__upcase__(db_id_)__upcase__(__value__(database));__upcase__(db_id_)__upcase__(__value__(database));LIBCOMMON_DYNAMIC_LIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ CommandLine="if not exist ..\lib64 mkdir ..\lib64"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odb-__value__(database)-d.lib;odb-d.lib"
+ OutputFile="$(OutDir)\bin64\common-d.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)\lib64\common-d.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".."
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/wd4355 /wd4800 /wd4290"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories=".."
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;__upcase__(db_id_)__upcase__(__value__(database));LIBCOMMON_DYNAMIC_LIB"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ CommandLine="if not exist ..\lib mkdir ..\lib"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odb-__value__(database).lib;odb.lib"
+ OutputFile="$(OutDir)\bin\common.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)\lib\common.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory=".."
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/wd4355 /wd4800 /wd4290"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories=".."
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;__upcase__(db_id_)__upcase__(__value__(database));LIBCOMMON_DYNAMIC_LIB"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ CommandLine="if not exist ..\lib64 mkdir ..\lib64"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odb-__value__(database)-d.lib;odb.lib"
+ OutputFile="$(OutDir)\bin64\common.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)\lib64\common.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cxx"
+ UniqueIdentifier="{AC9C925E-DBC7-4706-85E4-BD38199359F7}"
+ >
+__source_entries__(sources)
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hxx;ixx;txx"
+ UniqueIdentifier="{D30085A2-1A37-43F8-9B2E-D82BD026A113}"
+ >
+__file_entries__(headers)
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/libcommon/common/makefile b/libcommon/common/makefile
new file mode 100644
index 0000000..2987959
--- /dev/null
+++ b/libcommon/common/makefile
@@ -0,0 +1,124 @@
+# file : libcommon/common/makefile
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+# license : GNU GPL v2; see accompanying LICENSE file
+
+include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
+
+# Options file.
+#
+cli_tun := options.cli
+cxx_tun := common.cxx
+
+cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(cli_tun:.cli=.o))
+cxx_od := $(cxx_obj:.o=.o.d)
+
+common.l := $(out_base)/common.l
+common.l.cpp-options := $(out_base)/common.l.cpp-options
+
+default := $(out_base)/
+dist := $(out_base)/.dist
+clean := $(out_base)/.clean
+
+# Import.
+#
+$(call import,\
+ $(scf_root)/import/cli/stub.make,\
+ cli: cli,cli-rules: cli_rules)
+
+$(call import,\
+ $(scf_root)/import/libodb/stub.make,\
+ l: odb.l,cpp-options: odb.l.cpp-options)
+
+ifdef db_id
+$(call import,\
+ $(scf_root)/import/libodb-$(db_id)/stub.make,\
+ l: odb_db.l,cpp-options: odb_db.l.cpp-options)
+endif
+
+ifeq ($(odb_db.l.cpp-options),)
+odb_db.l.cpp-options := $(out_base)/.unbuildable
+endif
+
+# Build.
+#
+$(common.l): $(cxx_obj) $(odb.l) $(odb_db.l)
+
+$(cxx_obj) $(cxx_od): $(common.l.cpp-options) $(out_base)/config.h
+$(common.l.cpp-options): value := -I$(out_root)/libcommon -I$(src_root)/libcommon
+$(common.l.cpp-options): $(odb_db.l.cpp-options) $(odb.l.cpp-options)
+
+genf := $(cli_tun:.cli=.hxx) $(cli_tun:.cli=.ixx) $(cli_tun:.cli=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
+
+$(gen): $(cli)
+$(gen): cli := $(cli)
+$(gen): cli_options += \
+--generate-specifier \
+--generate-file-scanner \
+--guard-prefix LIBCOMMON_COMMON
+
+$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
+
+$(out_base)/config.h: $(dcf_root)/configuration-dynamic.make
+ @echo '// file : libcommon/config.h' >$@
+ @echo '// author : automatically generated' >>$@
+ @echo '' >>$@
+ @echo '#ifndef LIBCOMMON_COMMON_CONFIG_H' >>$@
+ @echo '#define LIBCOMMON_COMMON_CONFIG_H' >>$@
+ @echo '' >>$@
+ifeq ($(db_id),mysql)
+ @echo '#define DB_ID_MYSQL 1' >>$@
+endif
+ @echo '' >>$@
+ @echo '#endif // LIBCOMMON_COMMON_CONFIG_H' >>$@
+
+# Convenience alias for default target.
+#
+$(out_base)/: $(common.l)
+
+# Dist.
+#
+$(dist): export sources := $(cxx_tun) $(cli_tun:.cli=.cxx)
+$(dist): export headers = $(subst $(src_base)/,,$(shell find $(src_base) \
+-name '*.hxx' -o -name '*.ixx' -o -name '*.txx'))
+$(dist): data_dist := $(cli_tun)
+$(dist): export extra_dist := $(data_dist) $(call vc9projs,libcommon) \
+$(call vc10projs,libcommon)
+
+$(dist): $(gen)
+ $(call dist-data,$(sources) $(headers) $(data_dist) config.h.in)
+ $(call meta-automake)
+ $(call meta-vc9projs,libcommon)
+ $(call meta-vc10projs,libcommon)
+
+# Clean.
+#
+$(clean): $(common.l).o.clean \
+ $(common.l.cpp-options).clean \
+ $(addsuffix .cxx.clean,$(cxx_obj)) \
+ $(addsuffix .cxx.clean,$(cxx_od))
+ $(call message,rm $$1,rm -f $$1,$(out_base)/config.h)
+
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(common.l): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := config.h
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+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/automake.make)
+
+$(call include,$(cli_rules))
+$(call include,$(bld_root)/cxx/cxx-d.make)
+$(call include,$(bld_root)/cxx/cxx-o.make)
+$(call include,$(bld_root)/cxx/o-l.make)
diff --git a/libcommon/options.cli b/libcommon/common/options.cli
index a16c5b0..5b87d70 100644
--- a/libcommon/options.cli
+++ b/libcommon/common/options.cli
@@ -1,4 +1,4 @@
-// file : libcommon/options.cli
+// file : libcommon/common/options.cli
// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
diff --git a/libcommon/options.cxx b/libcommon/common/options.cxx
index 9d15251..9d15251 100644
--- a/libcommon/options.cxx
+++ b/libcommon/common/options.cxx
diff --git a/libcommon/options.hxx b/libcommon/common/options.hxx
index d9e3ab8..7d043a3 100644
--- a/libcommon/options.hxx
+++ b/libcommon/common/options.hxx
@@ -2,8 +2,8 @@
// compiler for C++.
//
-#ifndef LIBCOMMON_OPTIONS_HXX
-#define LIBCOMMON_OPTIONS_HXX
+#ifndef LIBCOMMON_COMMON_OPTIONS_HXX
+#define LIBCOMMON_COMMON_OPTIONS_HXX
#include <deque>
#include <iosfwd>
@@ -393,4 +393,4 @@ namespace cli
#include "options.ixx"
-#endif // LIBCOMMON_OPTIONS_HXX
+#endif // LIBCOMMON_COMMON_OPTIONS_HXX
diff --git a/libcommon/options.ixx b/libcommon/common/options.ixx
index 0fa60e5..0fa60e5 100644
--- a/libcommon/options.ixx
+++ b/libcommon/common/options.ixx
diff --git a/libcommon/libcommon-vc10.sln b/libcommon/libcommon-vc10.sln
new file mode 100644
index 0000000..9042eed
--- /dev/null
+++ b/libcommon/libcommon-vc10.sln
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcommon", "common\libcommon-__value__(database)-vc10.vcxproj", "{019C2E51-BF41-4490-AB96-4156741B8CC9}"
+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
+ {019C2E51-BF41-4490-AB96-4156741B8CC9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {019C2E51-BF41-4490-AB96-4156741B8CC9}.Debug|Win32.Build.0 = Debug|Win32
+ {019C2E51-BF41-4490-AB96-4156741B8CC9}.Debug|x64.ActiveCfg = Debug|x64
+ {019C2E51-BF41-4490-AB96-4156741B8CC9}.Debug|x64.Build.0 = Debug|x64
+ {019C2E51-BF41-4490-AB96-4156741B8CC9}.Release|Win32.ActiveCfg = Release|Win32
+ {019C2E51-BF41-4490-AB96-4156741B8CC9}.Release|Win32.Build.0 = Release|Win32
+ {019C2E51-BF41-4490-AB96-4156741B8CC9}.Release|x64.ActiveCfg = Release|x64
+ {019C2E51-BF41-4490-AB96-4156741B8CC9}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/libcommon/libcommon-vc9.sln b/libcommon/libcommon-vc9.sln
new file mode 100644
index 0000000..e12c11d
--- /dev/null
+++ b/libcommon/libcommon-vc9.sln
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcommon", "common\libcommon-__value__(database)-vc9.vcproj", "{8575F058-1BD6-4F97-8901-83D0110C2B6B}"
+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
+ {8575F058-1BD6-4F97-8901-83D0110C2B6B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8575F058-1BD6-4F97-8901-83D0110C2B6B}.Debug|Win32.Build.0 = Debug|Win32
+ {8575F058-1BD6-4F97-8901-83D0110C2B6B}.Debug|x64.ActiveCfg = Debug|x64
+ {8575F058-1BD6-4F97-8901-83D0110C2B6B}.Debug|x64.Build.0 = Debug|x64
+ {8575F058-1BD6-4F97-8901-83D0110C2B6B}.Release|Win32.ActiveCfg = Release|Win32
+ {8575F058-1BD6-4F97-8901-83D0110C2B6B}.Release|Win32.Build.0 = Release|Win32
+ {8575F058-1BD6-4F97-8901-83D0110C2B6B}.Release|x64.ActiveCfg = Release|x64
+ {8575F058-1BD6-4F97-8901-83D0110C2B6B}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/libcommon/makefile b/libcommon/makefile
index cdb57bc..8f72324 100644
--- a/libcommon/makefile
+++ b/libcommon/makefile
@@ -1,119 +1,30 @@
# file : libcommon/makefile
# author : Boris Kolpackov <boris@codesynthesis.com>
# copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
-# license : GNU GPL v2; see accompanying LICENSE file
+# license : GNU GPL; see accompanying LICENSE file
include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make
-# Options file.
-#
-cli_tun := options.cli
-cxx_tun := common.cxx
+dirs := common
-cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(cli_tun:.cli=.o))
-cxx_od := $(cxx_obj:.o=.o.d)
+default := $(out_base)/
+dist := $(out_base)/.dist
+clean := $(out_base)/.clean
-common.l := $(out_base)/common.l
-common.l.cpp-options := $(out_base)/common.l.cpp-options
+$(default): $(addprefix $(out_base)/,$(addsuffix /,$(dirs)))
-default := $(out_base)/
-dist := $(out_base)/.dist
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/cli/stub.make,\
- cli: cli,cli-rules: cli_rules)
-
-$(call import,\
- $(scf_root)/import/libodb/stub.make,\
- l: odb.l,cpp-options: odb.l.cpp-options)
-
-ifdef db_id
-$(call import,\
- $(scf_root)/import/libodb-$(db_id)/stub.make,\
- l: odb_db.l,cpp-options: odb_db.l.cpp-options)
-endif
-
-ifeq ($(odb_db.l.cpp-options),)
-odb_db.l.cpp-options := $(out_base)/.unbuildable
-endif
-
-# Build.
-#
-$(common.l): $(cxx_obj) $(odb.l) $(odb_db.l)
-
-$(cxx_obj) $(cxx_od): $(common.l.cpp-options) $(out_base)/config.h
-$(common.l.cpp-options): value := -I$(out_base) -I$(src_base)
-$(common.l.cpp-options): $(odb_db.l.cpp-options) $(odb.l.cpp-options)
-
-genf := $(cli_tun:.cli=.hxx) $(cli_tun:.cli=.ixx) $(cli_tun:.cli=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): $(cli)
-$(gen): cli := $(cli)
-$(gen): cli_options += \
---generate-specifier \
---generate-file-scanner \
---guard-prefix LIBCOMMON
-
-$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
-
-$(out_base)/config.h: $(dcf_root)/configuration-dynamic.make
- @echo '// file : libcommon/config.h' >$@
- @echo '// author : automatically generated' >>$@
- @echo '' >>$@
- @echo '#ifndef LIBCOMMON_CONFIG_H' >>$@
- @echo '#define LIBCOMMON_CONFIG_H' >>$@
- @echo '' >>$@
-ifeq ($(db_id),mysql)
- @echo '#define DB_ID_MYSQL 1' >>$@
-endif
- @echo '' >>$@
- @echo '#endif // LIBCOMMON_CONFIG_H' >>$@
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(common.l)
-
-# Dist.
-#
-$(dist): export sources := $(cxx_tun) $(cli_tun:.cli=.cxx)
-$(dist): export headers = $(subst $(src_base)/,,$(shell find $(src_base) \
--name '*.hxx' -o -name '*.ixx' -o -name '*.txx'))
-$(dist): data_dist := $(cli_tun)
-$(dist): export extra_dist := $(data_dist)
-
-$(dist): $(gen)
- $(call dist-data,$(sources) $(headers) $(data_dist) config.h.in)
+$(dist): export dirs := $(dirs)
+$(dist): export extra_dist := $(call vc9slns,libcommon) \
+$(call vc10slns,libcommon)
+$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(dirs)))
$(call meta-automake)
+ $(call meta-vc9slns,libcommon)
+ $(call meta-vc10slns,libcommon)
-# Clean.
-#
-$(clean): $(common.l).o.clean \
- $(common.l.cpp-options).clean \
- $(addsuffix .cxx.clean,$(cxx_obj)) \
- $(addsuffix .cxx.clean,$(cxx_od))
- $(call message,rm $$1,rm -f $$1,$(out_base)/config.h)
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(common.l): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := config.h
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
+$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(dirs)))
-# How to.
-#
-$(call include,$(bld_root)/dist.make)
+$(call include,$(bld_root)/meta/vc9sln.make)
+$(call include,$(bld_root)/meta/vc10sln.make)
$(call include,$(bld_root)/meta/automake.make)
-$(call include,$(cli_rules))
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/o-l.make)
+$(foreach d,$(dirs),$(call import,$(src_base)/$d/makefile))
diff --git a/makefile b/makefile
index aba3aee..213bab2 100644
--- a/makefile
+++ b/makefile
@@ -19,7 +19,7 @@ clean := $(out_base)/.clean
$(default): $(addprefix $(out_base)/,$(addsuffix /,$(dirs)))
-$(dist): data_dist := GPLv2 LICENSE README version
+$(dist): data_dist := GPLv2 LICENSE README version tester.bat
$(dist): exec_dist := bootstrap tester.in
$(dist): export extra_dist := $(data_dist) $(exec_dist)
$(dist): export version = $(shell cat $(src_root)/version)
diff --git a/mysql/Makefile.am b/mysql/Makefile.am
index 1e8c1c0..d07384b 100644
--- a/mysql/Makefile.am
+++ b/mysql/Makefile.am
@@ -4,3 +4,4 @@
# license : GNU GPL v2; see accompanying LICENSE file
SUBDIRS = __path__(dirs)
+EXTRA_DIST = __file__(extra_dist)
diff --git a/mysql/makefile b/mysql/makefile
index 53dd049..4b94e4c 100644
--- a/mysql/makefile
+++ b/mysql/makefile
@@ -17,13 +17,21 @@ clean := $(out_base)/.clean
$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
+$(dist): name := $(notdir $(src_base))
$(dist): export dirs := $(tests)
+$(dist): export extra_dist := $(name)-vc9.sln $(name)-vc10.sln tests.bat
$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(tests)))
$(call meta-automake)
+ $(call meta-vc9sln,$(name)-vc9.sln)
+ $(call meta-vc10sln,$(name)-vc10.sln)
+ $(call meta-vctest,$(name)-vc10.sln,$(src_root)/test.bat)
$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
$(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/vctest.make)
$(call include,$(bld_root)/meta/automake.make)
$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/mysql/mysql-vc10.sln b/mysql/mysql-vc10.sln
new file mode 100644
index 0000000..9a5dc32
--- /dev/null
+++ b/mysql/mysql-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/mysql/mysql-vc9.sln b/mysql/mysql-vc9.sln
new file mode 100644
index 0000000..2ec9432
--- /dev/null
+++ b/mysql/mysql-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/mysql/template/Makefile.am b/mysql/template/Makefile.am
index 46c3bae..229e071 100644
--- a/mysql/template/Makefile.am
+++ b/mysql/template/Makefile.am
@@ -3,13 +3,15 @@
# copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
+EXTRA_DIST = __file__(extra_dist)
+
noinst_PROGRAMS = driver
driver_SOURCES = driver.cxx __path__(extra_sources) __path__(extra_headers)
-driver_LDADD = $(top_builddir)/libcommon/libcommon.la
+driver_LDADD = $(top_builddir)/libcommon/common/libcommon.la
driver_CPPFLAGS = -I'$(top_builddir)/libcommon' -I'$(top_srcdir)/libcommon'
TESTS=$(top_builddir)/tester
-TESTS_ENVIRONMENT=top_builddir=$(top_builddir);
+TESTS_ENVIRONMENT=top_builddir=$(top_builddir); export top_builddir;
m4_ifelse(__value__(odb_options),,,
diff --git a/mysql/template/driver.cxx b/mysql/template/driver.cxx
index 4f1bb52..45a73eb 100644
--- a/mysql/template/driver.cxx
+++ b/mysql/template/driver.cxx
@@ -13,7 +13,7 @@
#include <odb/mysql/database.hxx>
#include <odb/mysql/transaction.hxx>
-#include <common.hxx>
+#include <common/common.hxx>
#include "test.hxx"
#include "test-odb.hxx"
diff --git a/mysql/template/makefile b/mysql/template/makefile
index 28146f4..d634728 100644
--- a/mysql/template/makefile
+++ b/mysql/template/makefile
@@ -10,20 +10,14 @@ odb_hdr := test.hxx
cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o))
cxx_od := $(cxx_obj:.o=.o.d)
-common.l := $(out_root)/libcommon/common.l
-common.l.cpp-options := $(out_root)/libcommon/common.l.cpp-options
+common.l := $(out_root)/libcommon/common/common.l
+common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
driver := $(out_base)/driver
dist := $(out_base)/.dist
test := $(out_base)/.test
clean := $(out_base)/.clean
-ifdef db_id
-ifneq ($(db_id),mysql)
-$(error trying to build a MySQL-specific test with $(db_id))
-endif
-endif
-
# Import.
#
$(call import,\
@@ -53,10 +47,17 @@ $(out_base)/: $(driver)
# Dist
#
-$(dist): data_dist := $(cxx_tun) $(odb_hdr) test.std
+$(dist): sources := $(cxx_tun)
+$(dist): headers := $(odb_hdr)
+$(dist): data_dist := test.std
+$(dist): export name := $(notdir $(src_base))
+$(dist): export extra_dist := $(data_dist) $(name)-vc9.vcproj \
+$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters
$(dist):
- $(call dist-data,$(data_dist))
- $(call meta-automake)
+ $(call dist-data,$(sources) $(headers) $(data_dist))
+ $(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)
# Test.
#
@@ -87,6 +88,8 @@ 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/automake.make)
$(call include,$(odb_rules))
diff --git a/mysql/template/template-vc10.vcxproj b/mysql/template/template-vc10.vcxproj
new file mode 100644
index 0000000..a6f172c
--- /dev/null
+++ b/mysql/template/template-vc10.vcxproj
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{__uuid__()}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>__value__(name)</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(Configuration)\</OutDir>
+ <TargetName>driver</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <TargetName>driver</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ <OutDir>$(Configuration)\</OutDir>
+ <TargetName>driver</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <TargetName>driver</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\libcommon</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\libcommon\lib\common-d.lib;odb-mysql-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\libcommon</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\libcommon\lib\common-d.lib;odb-mysql-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\libcommon</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\libcommon\lib\common.lib;odb-mysql.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\libcommon</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\..\libcommon\lib\common.lib;odb-mysql.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+m4_ifelse(__value__(odb_options),,,
+m4_dnl
+ <ItemGroup>
+__custom_build_entry__(
+test.hxx,
+odb test.hxx,
+odb.exe __xml__(__shell_quotes__(__value__(odb_options))) test.hxx,
+test-odb.hxx;test-odb.ixx;test-odb.cxx)
+ </ItemGroup>)
+ <ItemGroup>
+m4_ifelse(__value__(odb_options),,,
+__header_entry__(test-odb.hxx)
+__header_entry__(test-odb.ixx))
+__header_entries__(extra_headers)
+ </ItemGroup>
+ <ItemGroup>
+__source_entry__(driver.cxx)
+m4_ifelse(__value__(odb_options),,,__source_entry__(test-odb.cxx))
+__source_entries__(extra_sources)
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/mysql/template/template-vc10.vcxproj.filters b/mysql/template/template-vc10.vcxproj.filters
new file mode 100644
index 0000000..951015b
--- /dev/null
+++ b/mysql/template/template-vc10.vcxproj.filters
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{__uuid__()}</UniqueIdentifier>
+ <Extensions>cxx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{__uuid__()}</UniqueIdentifier>
+ <Extensions>h;hxx;ixx;txx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+m4_ifelse(__value__(odb_options),,,
+__header_filter_entry__(test.hxx)
+__header_filter_entry__(test-odb.hxx)
+__header_filter_entry__(test-odb.ixx))
+__header_filter_entries__(extra_headers)
+ </ItemGroup>
+ <ItemGroup>
+__source_filter_entry__(driver.cxx)
+m4_ifelse(__value__(odb_options),,,__source_filter_entry__(test-odb.cxx))
+__source_filter_entries__(extra_sources)
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/mysql/template/template-vc9.vcproj b/mysql/template/template-vc9.vcproj
new file mode 100644
index 0000000..a8dbd23
--- /dev/null
+++ b/mysql/template/template-vc9.vcproj
@@ -0,0 +1,357 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="__value__(name)"
+ ProjectGUID="{__uuid__()}"
+ RootNamespace="__value__(name)"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\libcommon"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\libcommon\lib\common-d.lib;odb-mysql-d.lib;odb-d.lib"
+ OutputFile="$(OutDir)\driver.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories="..\..\libcommon"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\libcommon\lib\common.lib;odb-mysql.lib;odb.lib"
+ OutputFile="$(OutDir)\driver.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\libcommon"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\libcommon\lib64\common-d.lib;odb-mysql-d.lib;odb-d.lib"
+ OutputFile="$(OutDir)\driver.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories="..\..\libcommon"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\libcommon\lib64\common.lib;odb-mysql.lib;odb.lib"
+ OutputFile="$(OutDir)\driver.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cxx"
+ UniqueIdentifier="{__uuid__()}"
+ >
+__source_entry__(driver.cxx)
+m4_ifelse(__value__(odb_options),,,__source_entry__(test-odb.cxx))
+__source_entries__(extra_sources)
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hxx;ixx;txx"
+ UniqueIdentifier="{__uuid__()}"
+ >
+m4_ifelse(__value__(odb_options),,,
+__file_entry_custom_build__(
+test.hxx,
+odb test.hxx,
+odb.exe __xml__(__shell_quotes__(__value__(odb_options))) test.hxx,
+test-odb.hxx;test-odb.ixx;test-odb.cxx)
+__file_entry__(test-odb.hxx)
+__file_entry__(test-odb.ixx))
+__file_entries__(extra_headers)
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/mysql/truncation/driver.cxx b/mysql/truncation/driver.cxx
index 2117a9e..46350d6 100644
--- a/mysql/truncation/driver.cxx
+++ b/mysql/truncation/driver.cxx
@@ -13,7 +13,7 @@
#include <odb/mysql/database.hxx>
#include <odb/mysql/transaction.hxx>
-#include <common.hxx>
+#include <common/common.hxx>
#include "test.hxx"
#include "test-odb.hxx"
diff --git a/mysql/truncation/makefile b/mysql/truncation/makefile
index f0d475d..a798c8d 100644
--- a/mysql/truncation/makefile
+++ b/mysql/truncation/makefile
@@ -10,20 +10,14 @@ odb_hdr := test.hxx
cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o))
cxx_od := $(cxx_obj:.o=.o.d)
-common.l := $(out_root)/libcommon/common.l
-common.l.cpp-options := $(out_root)/libcommon/common.l.cpp-options
+common.l := $(out_root)/libcommon/common/common.l
+common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
driver := $(out_base)/driver
dist := $(out_base)/.dist
test := $(out_base)/.test
clean := $(out_base)/.clean
-ifdef db_id
-ifneq ($(db_id),mysql)
-$(error trying to build a MySQL-specific test with $(db_id))
-endif
-endif
-
# Import.
#
$(call import,\
@@ -53,10 +47,17 @@ $(out_base)/: $(driver)
# Dist
#
-$(dist): data_dist := $(cxx_tun) $(odb_hdr) test.std
+$(dist): sources := $(cxx_tun)
+$(dist): headers := $(odb_hdr)
+$(dist): data_dist := test.std
+$(dist): export name := $(notdir $(src_base))
+$(dist): export extra_dist := $(data_dist) $(name)-vc9.vcproj \
+$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters
$(dist):
- $(call dist-data,$(data_dist))
- $(call meta-automake,$(src_root)/mysql/template/Makefile.am)
+ $(call dist-data,$(sources) $(headers) $(data_dist))
+ $(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)
# Test.
#
@@ -87,6 +88,8 @@ 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/automake.make)
$(call include,$(odb_rules))
diff --git a/mysql/types/driver.cxx b/mysql/types/driver.cxx
index e0d6b42..2a6c94e 100644
--- a/mysql/types/driver.cxx
+++ b/mysql/types/driver.cxx
@@ -13,7 +13,7 @@
#include <odb/mysql/database.hxx>
#include <odb/mysql/transaction.hxx>
-#include <common.hxx>
+#include <common/common.hxx>
#include "test.hxx"
#include "test-odb.hxx"
@@ -42,7 +42,7 @@ main (int argc, char* argv[])
o.long_long_ = -123456;
o.ulong_long_ = 123456;
- o.float_ = 1.123;
+ o.float_ = 1.123F;
o.double_ = 1.123;
o.decimal_ = "123.456";
diff --git a/mysql/types/makefile b/mysql/types/makefile
index 859ef29..60ee402 100644
--- a/mysql/types/makefile
+++ b/mysql/types/makefile
@@ -10,20 +10,14 @@ odb_hdr := test.hxx
cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o))
cxx_od := $(cxx_obj:.o=.o.d)
-common.l := $(out_root)/libcommon/common.l
-common.l.cpp-options := $(out_root)/libcommon/common.l.cpp-options
+common.l := $(out_root)/libcommon/common/common.l
+common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
driver := $(out_base)/driver
dist := $(out_base)/.dist
test := $(out_base)/.test
clean := $(out_base)/.clean
-ifdef db_id
-ifneq ($(db_id),mysql)
-$(error trying to build a MySQL-specific test with $(db_id))
-endif
-endif
-
# Import.
#
$(call import,\
@@ -55,11 +49,18 @@ $(out_base)/: $(driver)
# Dist
#
-$(dist): data_dist := $(cxx_tun) $(odb_hdr) traits.hxx test.std
+$(dist): sources := $(cxx_tun)
+$(dist): headers := $(odb_hdr)
$(dist): export extra_headers := traits.hxx
+$(dist): data_dist := test.std
+$(dist): export name := $(notdir $(src_base))
+$(dist): export extra_dist := $(data_dist) $(name)-vc9.vcproj \
+$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters
$(dist):
- $(call dist-data,$(data_dist))
- $(call meta-automake,$(src_root)/mysql/template/Makefile.am)
+ $(call dist-data,$(sources) $(headers) $(extra_headers) $(data_dist))
+ $(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)
# Test.
#
@@ -90,6 +91,8 @@ 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/automake.make)
$(call include,$(odb_rules))
diff --git a/test.bat b/test.bat
new file mode 100644
index 0000000..9c72b2d
--- /dev/null
+++ b/test.bat
@@ -0,0 +1,48 @@
+@echo off
+rem file : test.bat
+rem author : Boris Kolpackov <boris@codesynthesis.com>
+rem copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+rem license : GNU GPL v2; see accompanying LICENSE file
+
+setlocal
+
+set "tests=__path__(dirs)"
+set "confs=__path__(configurations)"
+set "topdir=__path__(topdir)\.."
+
+goto start
+
+:run_test
+ cd %1
+
+ if exist %2\driver.exe (
+ echo %1\%2
+ call %topdir%\tester.bat tracer %2
+ if errorlevel 1 (
+ set "failed=%failed% %1\%2"
+ )
+ )
+
+ cd ..
+goto :eof
+
+:start
+
+for %%t in (%tests%) do (
+ for %%c in (%confs%) do (
+ call :run_test %%t %%c
+ )
+)
+
+if not "_%failed%_" == "__" goto error
+
+echo ALL TESTS PASSED
+goto end
+
+:error
+for %%t in (%failed%) do echo FAILED: %%t
+exit /b 1
+goto end
+
+:end
+endlocal
diff --git a/tester.bat b/tester.bat
new file mode 100644
index 0000000..9d812ac
--- /dev/null
+++ b/tester.bat
@@ -0,0 +1,54 @@
+@echo off
+rem file : tester.bat
+rem author : Boris Kolpackov <boris@codesynthesis.com>
+rem copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+rem license : GNU GPL v2; see accompanying LICENSE file
+
+rem Run an ODB test. The test directory is the current directory.
+rem %1 database id, for example, mysql
+rem %2 configuration, for example, Debug or x64/Debug
+rem topdir variable containing the path to top project directory
+
+rem clear errorlevel
+rem setlocal & endlocal
+
+rem echo %1
+rem echo %2
+rem echo "%topdir%"
+
+if "_%DIFF%_" == "__" set DIFF=fc
+
+if exist test.sql (
+ %topdir%\%1-driver test.sql
+ if errorlevel 1 goto error
+)
+
+rem echo %2\driver.exe --options-file %topdir%\%1.options
+
+if exist test.std (
+ %2\driver.exe --options-file %topdir%\%1.options >test.out
+ if errorlevel 1 goto error
+ %DIFF% test.std test.out
+
+ if errorlevel 1 (
+ del /f test.out
+ goto error
+ )
+
+ del /f test.out
+ goto end
+
+) else (
+
+ %2\driver.exe --options-file %topdir%\%1.options
+ if errorlevel 1 goto error
+)
+
+goto end
+
+
+:error
+exit /b 1
+goto end
+
+:end
diff --git a/tester.in b/tester.in
index b34c6ab..34e31a5 100755
--- a/tester.in
+++ b/tester.in
@@ -26,6 +26,9 @@ if test -f "$srcdir/test.std"; then
fi
@DIFF@ @DIFFFLAGS@ "$srcdir/test.std" test.out
+ r=$?
+ rm -f test.out
+ exit $r
else
./driver --options-file "$top_builddir/db.options"
fi
diff --git a/tracer/Makefile.am b/tracer/Makefile.am
index 32feb34..395bd7c 100644
--- a/tracer/Makefile.am
+++ b/tracer/Makefile.am
@@ -4,3 +4,4 @@
# license : GNU GPL v2; see accompanying LICENSE file
SUBDIRS = __path__(dirs)
+EXTRA_DIST = __file__(extra_dist) \ No newline at end of file
diff --git a/tracer/makefile b/tracer/makefile
index 731573a..3d40a9a 100644
--- a/tracer/makefile
+++ b/tracer/makefile
@@ -18,13 +18,22 @@ clean := $(out_base)/.clean
$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
+$(dist): name := $(notdir $(src_base))
$(dist): export dirs := $(tests)
+$(dist): export extra_dist := $(name)-vc9.sln $(name)-vc10.sln tests.bat
$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(tests)))
$(call meta-automake)
+ $(call meta-vc9sln,$(name)-vc9.sln)
+ $(call meta-vc10sln,$(name)-vc10.sln)
+ $(call meta-vctest,$(name)-vc10.sln,$(src_root)/test.bat)
+
$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
$(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/vctest.make)
$(call include,$(bld_root)/meta/automake.make)
$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tracer/object/makefile b/tracer/object/makefile
index 1fd819b..b74ece7 100644
--- a/tracer/object/makefile
+++ b/tracer/object/makefile
@@ -52,10 +52,17 @@ $(out_base)/: $(driver)
# Dist
#
-$(dist): data_dist := $(cxx_tun) $(odb_hdr) test.std
+$(dist): sources := $(cxx_tun)
+$(dist): headers := $(odb_hdr)
+$(dist): data_dist := test.std
+$(dist): export name := $(notdir $(src_base))
+$(dist): export extra_dist := $(data_dist) $(name)-vc9.vcproj \
+$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters
$(dist):
- $(call dist-data,$(data_dist))
- $(call meta-automake,$(src_root)/tracer/template/Makefile.am)
+ $(call dist-data,$(sources) $(headers) $(data_dist))
+ $(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)
# Test.
#
@@ -84,6 +91,8 @@ 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/automake.make)
$(call include,$(odb_rules))
diff --git a/tracer/template/Makefile.am b/tracer/template/Makefile.am
index 09e4f09..a3bed1e 100644
--- a/tracer/template/Makefile.am
+++ b/tracer/template/Makefile.am
@@ -3,11 +3,13 @@
# copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
+EXTRA_DIST = __file__(extra_dist)
+
noinst_PROGRAMS = driver
driver_SOURCES = driver.cxx __path__(extra_sources) __path__(extra_headers)
TESTS=$(top_builddir)/tester
-TESTS_ENVIRONMENT=top_builddir=$(top_builddir);
+TESTS_ENVIRONMENT=top_builddir=$(top_builddir); export top_builddir;
m4_ifelse(__value__(odb_options),,,
diff --git a/tracer/template/makefile b/tracer/template/makefile
index b7b82b7..4403281 100644
--- a/tracer/template/makefile
+++ b/tracer/template/makefile
@@ -52,10 +52,17 @@ $(out_base)/: $(driver)
# Dist
#
-$(dist): data_dist := $(cxx_tun) $(odb_hdr) test.std
+$(dist): sources := $(cxx_tun)
+$(dist): headers := $(odb_hdr)
+$(dist): data_dist := test.std
+$(dist): export name := $(notdir $(src_base))
+$(dist): export extra_dist := $(data_dist) $(name)-vc9.vcproj \
+$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters
$(dist):
- $(call dist-data,$(data_dist))
- $(call meta-automake)
+ $(call dist-data,$(sources) $(headers) $(data_dist))
+ $(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)
# Test.
#
@@ -84,6 +91,8 @@ 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/automake.make)
$(call include,$(odb_rules))
diff --git a/tracer/template/template-vc10.vcxproj b/tracer/template/template-vc10.vcxproj
new file mode 100644
index 0000000..2be749a
--- /dev/null
+++ b/tracer/template/template-vc10.vcxproj
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{__uuid__()}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>__value__(name)</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(Configuration)\</OutDir>
+ <TargetName>driver</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <TargetName>driver</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ <OutDir>$(Configuration)\</OutDir>
+ <TargetName>driver</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <TargetName>driver</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>odb-tracer-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>odb-tracer-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>odb-tracer.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>odb-tracer.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+m4_ifelse(__value__(odb_options),,,
+m4_dnl
+ <ItemGroup>
+__custom_build_entry__(
+test.hxx,
+odb test.hxx,
+odb.exe __xml__(__shell_quotes__(__value__(odb_options))) test.hxx,
+test-odb.hxx;test-odb.ixx;test-odb.cxx)
+ </ItemGroup>)
+ <ItemGroup>
+m4_ifelse(__value__(odb_options),,,
+__header_entry__(test-odb.hxx)
+__header_entry__(test-odb.ixx))
+__header_entries__(extra_headers)
+ </ItemGroup>
+ <ItemGroup>
+__source_entry__(driver.cxx)
+m4_ifelse(__value__(odb_options),,,__source_entry__(test-odb.cxx))
+__source_entries__(extra_sources)
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/tracer/template/template-vc10.vcxproj.filters b/tracer/template/template-vc10.vcxproj.filters
new file mode 100644
index 0000000..951015b
--- /dev/null
+++ b/tracer/template/template-vc10.vcxproj.filters
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{__uuid__()}</UniqueIdentifier>
+ <Extensions>cxx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{__uuid__()}</UniqueIdentifier>
+ <Extensions>h;hxx;ixx;txx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+m4_ifelse(__value__(odb_options),,,
+__header_filter_entry__(test.hxx)
+__header_filter_entry__(test-odb.hxx)
+__header_filter_entry__(test-odb.ixx))
+__header_filter_entries__(extra_headers)
+ </ItemGroup>
+ <ItemGroup>
+__source_filter_entry__(driver.cxx)
+m4_ifelse(__value__(odb_options),,,__source_filter_entry__(test-odb.cxx))
+__source_filter_entries__(extra_sources)
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/tracer/template/template-vc9.vcproj b/tracer/template/template-vc9.vcproj
new file mode 100644
index 0000000..527a9d7
--- /dev/null
+++ b/tracer/template/template-vc9.vcproj
@@ -0,0 +1,353 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="__value__(name)"
+ ProjectGUID="{__uuid__()}"
+ RootNamespace="__value__(name)"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odb-tracer-d.lib;odb-d.lib"
+ OutputFile="$(OutDir)\driver.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odb-tracer.lib;odb.lib"
+ OutputFile="$(OutDir)\driver.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odb-tracer-d.lib;odb-d.lib"
+ OutputFile="$(OutDir)\driver.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odb-tracer.lib;odb.lib"
+ OutputFile="$(OutDir)\driver.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cxx"
+ UniqueIdentifier="{__uuid__()}"
+ >
+__source_entry__(driver.cxx)
+m4_ifelse(__value__(odb_options),,,__source_entry__(test-odb.cxx))
+__source_entries__(extra_sources)
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hxx;ixx;txx"
+ UniqueIdentifier="{__uuid__()}"
+ >
+m4_ifelse(__value__(odb_options),,,
+__file_entry_custom_build__(
+test.hxx,
+odb test.hxx,
+odb.exe __xml__(__shell_quotes__(__value__(odb_options))) test.hxx,
+test-odb.hxx;test-odb.ixx;test-odb.cxx)
+__file_entry__(test-odb.hxx)
+__file_entry__(test-odb.ixx))
+__file_entries__(extra_headers)
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/tracer/tracer-vc10.sln b/tracer/tracer-vc10.sln
new file mode 100644
index 0000000..9a5dc32
--- /dev/null
+++ b/tracer/tracer-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/tracer/tracer-vc9.sln b/tracer/tracer-vc9.sln
new file mode 100644
index 0000000..2ec9432
--- /dev/null
+++ b/tracer/tracer-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/tracer/transaction/makefile b/tracer/transaction/makefile
index fd1d698..12ca226 100644
--- a/tracer/transaction/makefile
+++ b/tracer/transaction/makefile
@@ -38,10 +38,16 @@ $(out_base)/: $(driver)
# Dist
#
-$(dist): data_dist := $(cxx_tun) test.std
+$(dist): sources := $(cxx_tun)
+$(dist): data_dist := test.std
+$(dist): export name := $(notdir $(src_base))
+$(dist): export extra_dist := $(data_dist) $(name)-vc9.vcproj \
+$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters
$(dist):
- $(call dist-data,$(data_dist))
- $(call meta-automake,$(src_root)/tracer/template/Makefile.am)
+ $(call dist-data,$(sources) $(headers) $(data_dist))
+ $(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)
# Test.
#
@@ -69,6 +75,8 @@ 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/automake.make)
$(call include,$(bld_root)/cxx/cxx-d.make)
diff --git a/tracer/types/makefile b/tracer/types/makefile
index f042476..474681d 100644
--- a/tracer/types/makefile
+++ b/tracer/types/makefile
@@ -52,10 +52,17 @@ $(out_base)/: $(driver)
# Dist
#
-$(dist): data_dist := $(cxx_tun) $(odb_hdr) test.std
+$(dist): sources := $(cxx_tun)
+$(dist): headers := $(odb_hdr)
+$(dist): data_dist := test.std
+$(dist): export name := $(notdir $(src_base))
+$(dist): export extra_dist := $(data_dist) $(name)-vc9.vcproj \
+$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters
$(dist):
- $(call dist-data,$(data_dist))
- $(call meta-automake,$(src_root)/tracer/template/Makefile.am)
+ $(call dist-data,$(sources) $(headers) $(data_dist))
+ $(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)
# Test.
#
@@ -84,6 +91,8 @@ 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/automake.make)
$(call include,$(odb_rules))