aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--access/makefile7
-rw-r--r--boost/boost-vc10.vcxproj2
-rw-r--r--boost/boost-vc11.vcxproj2
-rw-r--r--boost/boost-vc9.vcproj2
-rw-r--r--boost/makefile6
-rw-r--r--c++11/makefile7
-rw-r--r--composite/makefile7
-rw-r--r--container/makefile5
-rw-r--r--hello/makefile6
-rw-r--r--inheritance/polymorphism/makefile7
-rw-r--r--inheritance/reuse/makefile7
-rw-r--r--inverse/makefile7
-rw-r--r--mapping/makefile8
-rw-r--r--optimistic/makefile5
-rw-r--r--pimpl/makefile7
-rw-r--r--prepared/makefile7
-rw-r--r--qt/makefile7
-rw-r--r--qt/qt4-vc10.vcxproj2
-rw-r--r--qt/qt4-vc11.vcxproj2
-rw-r--r--qt/qt4-vc9.vcproj2
-rw-r--r--qt/qt5-vc10.vcxproj2
-rw-r--r--qt/qt5-vc11.vcxproj2
-rw-r--r--qt/qt5-vc9.vcproj2
-rw-r--r--query/makefile7
-rw-r--r--relationship/makefile7
-rw-r--r--schema/custom/makefile7
-rw-r--r--schema/embedded/makefile7
-rw-r--r--template/Makefile.am2
-rw-r--r--template/makefile5
-rw-r--r--template/template-vc10.vcxproj2
-rw-r--r--template/template-vc11.vcxproj2
-rw-r--r--template/template-vc9.vcproj2
-rw-r--r--view/makefile8
33 files changed, 89 insertions, 71 deletions
diff --git a/access/makefile b/access/makefile
index fa04be6..2283c9b 100644
--- a/access/makefile
+++ b/access/makefile
@@ -45,11 +45,13 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
---generate-query --table-prefix access_
+$(gen) $(dist): export odb_options += --generate-schema --generate-query \
+--table-prefix access_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -60,7 +62,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/boost/boost-vc10.vcxproj b/boost/boost-vc10.vcxproj
index 1a8090c..c6e5083 100644
--- a/boost/boost-vc10.vcxproj
+++ b/boost/boost-vc10.vcxproj
@@ -154,7 +154,7 @@
__custom_build_entry__(
__path__(odb_header_stem).hxx,
odb __path__(odb_header_stem).hxx,
-odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)))) __path__(odb_header_stem).hxx,
+odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options))) __path__(odb_header_stem).hxx,
__path__(odb_header_stem)-odb.hxx;__path__(odb_header_stem)-odb.ixx;__path__(odb_header_stem)-odb.cxx)
</ItemGroup>
<ItemGroup>
diff --git a/boost/boost-vc11.vcxproj b/boost/boost-vc11.vcxproj
index 6a768f0..ef60fc2 100644
--- a/boost/boost-vc11.vcxproj
+++ b/boost/boost-vc11.vcxproj
@@ -158,7 +158,7 @@
__custom_build_entry__(
__path__(odb_header_stem).hxx,
odb __path__(odb_header_stem).hxx,
-odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)))) __path__(odb_header_stem).hxx,
+odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options))) __path__(odb_header_stem).hxx,
__path__(odb_header_stem)-odb.hxx;__path__(odb_header_stem)-odb.ixx;__path__(odb_header_stem)-odb.cxx)
</ItemGroup>
<ItemGroup>
diff --git a/boost/boost-vc9.vcproj b/boost/boost-vc9.vcproj
index a282086..e3f5252 100644
--- a/boost/boost-vc9.vcproj
+++ b/boost/boost-vc9.vcproj
@@ -344,7 +344,7 @@ __source_entries__(extra_sources)
__file_entry_custom_build__(
__path__(odb_header_stem).hxx,
odb __path__(odb_header_stem).hxx,
-odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)))) __path__(odb_header_stem).hxx,
+odb.exe --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options))) __path__(odb_header_stem).hxx,
__path__(odb_header_stem)-odb.hxx;__path__(odb_header_stem)-odb.ixx;__path__(odb_header_stem)-odb.cxx)
__file_entry__(__path__(odb_header_stem)-odb.hxx)
__file_entry__(__path__(odb_header_stem)-odb.ixx)
diff --git a/boost/makefile b/boost/makefile
index c254212..a5bba42 100644
--- a/boost/makefile
+++ b/boost/makefile
@@ -58,11 +58,13 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --profile boost \
+$(gen) $(dist): export odb_options += --profile boost \
--generate-query --generate-schema --generate-session --table-prefix boost_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options) $(odb_boost.l.cpp-options) $(boost.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -73,7 +75,7 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
+
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/c++11/makefile b/c++11/makefile
index a68032d..c2c59ab 100644
--- a/c++11/makefile
+++ b/c++11/makefile
@@ -58,8 +58,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) \
---generate-query --generate-schema --table-prefix boost_
+$(gen) $(dist): export odb_options += --generate-query --generate-schema \
+--table-prefix boost_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options) $(odb_boost.l.cpp-options) $(boost.l.cpp-options)
@@ -68,6 +68,8 @@ $(gen): $(odb.l.cpp-options) $(odb_boost.l.cpp-options) $(boost.l.cpp-options)
$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
ifeq ($(cxx_standard),c++11)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
endif
@@ -79,7 +81,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/composite/makefile b/composite/makefile
index 9187ee0..04d9511 100644
--- a/composite/makefile
+++ b/composite/makefile
@@ -45,11 +45,13 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
---generate-query --table-prefix c_
+$(gen) $(dist): export odb_options += --generate-schema --generate-query \
+--table-prefix c_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -60,7 +62,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/container/makefile b/container/makefile
index e6701c0..23cfee4 100644
--- a/container/makefile
+++ b/container/makefile
@@ -45,11 +45,13 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
+$(gen) $(dist): export odb_options += --generate-schema \
--table-prefix container_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -60,7 +62,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/hello/makefile b/hello/makefile
index 8bdfb97..0046674 100644
--- a/hello/makefile
+++ b/hello/makefile
@@ -45,11 +45,12 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-query \
---generate-schema
+$(gen) $(dist): export odb_options += --generate-query --generate-schema
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -60,7 +61,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/inheritance/polymorphism/makefile b/inheritance/polymorphism/makefile
index 88456ae..51bc5c4 100644
--- a/inheritance/polymorphism/makefile
+++ b/inheritance/polymorphism/makefile
@@ -45,11 +45,13 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
---generate-query --table-prefix inh_poly_
+$(gen) $(dist): export odb_options += --generate-schema --generate-query \
+--table-prefix inh_poly_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -60,7 +62,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/inheritance/reuse/makefile b/inheritance/reuse/makefile
index b47b703..46e786e 100644
--- a/inheritance/reuse/makefile
+++ b/inheritance/reuse/makefile
@@ -45,11 +45,13 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
---generate-query --table-prefix inh_reuse_
+$(gen) $(dist): export odb_options += --generate-schema --generate-query \
+--table-prefix inh_reuse_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -60,7 +62,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/inverse/makefile b/inverse/makefile
index 848aeb3..d7d8680 100644
--- a/inverse/makefile
+++ b/inverse/makefile
@@ -45,12 +45,14 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-query \
---generate-schema --generate-session --default-pointer std::tr1::shared_ptr \
+$(gen) $(dist): export odb_options += --generate-query --generate-schema \
+--generate-session --default-pointer std::tr1::shared_ptr \
--table-prefix inverse_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -61,7 +63,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/mapping/makefile b/mapping/makefile
index ff5b1f2..80bdd86 100644
--- a/mapping/makefile
+++ b/mapping/makefile
@@ -45,12 +45,13 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
---generate-query --hxx-prologue '\#include "traits.hxx"' \
---table-prefix mapping_
+$(gen) $(dist): export odb_options += --generate-schema --generate-query \
+--hxx-prologue '\#include "traits.hxx"' --table-prefix mapping_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -61,7 +62,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/optimistic/makefile b/optimistic/makefile
index e7bd43f..1186e48 100644
--- a/optimistic/makefile
+++ b/optimistic/makefile
@@ -45,11 +45,13 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
+$(gen) $(dist): export odb_options += --generate-schema \
--table-prefix optimistic_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -60,7 +62,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/pimpl/makefile b/pimpl/makefile
index cfdde26..c6b4e08 100644
--- a/pimpl/makefile
+++ b/pimpl/makefile
@@ -45,11 +45,13 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
---generate-query --table-prefix pimpl_
+$(gen) $(dist): export odb_options += --generate-schema --generate-query \
+--table-prefix pimpl_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -60,7 +62,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/prepared/makefile b/prepared/makefile
index de5ebd0..5ff35fe 100644
--- a/prepared/makefile
+++ b/prepared/makefile
@@ -45,11 +45,13 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-query \
---generate-prepared --generate-schema
+$(gen) $(dist): export odb_options += --generate-query --generate-schema \
+--generate-prepared
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -60,7 +62,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/qt/makefile b/qt/makefile
index cb2a0d2..37c0c6b 100644
--- a/qt/makefile
+++ b/qt/makefile
@@ -54,11 +54,13 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --profile qt \
---generate-query --generate-schema --generate-session --table-prefix Qt
+$(gen) $(dist): export odb_options += --generate-schema --generate-query \
+--generate-session --profile qt --table-prefix qt_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options) $(odb_qt.l.cpp-options) $(qt_core.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -69,7 +71,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/qt/qt4-vc10.vcxproj b/qt/qt4-vc10.vcxproj
index 560489e..ec48faf 100644
--- a/qt/qt4-vc10.vcxproj
+++ b/qt/qt4-vc10.vcxproj
@@ -154,7 +154,7 @@
__custom_build_entry__(
__path__(odb_header_stem).hxx,
odb __path__(odb_header_stem).hxx,
-odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)))) __path__(odb_header_stem).hxx,
+odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options))) __path__(odb_header_stem).hxx,
__path__(odb_header_stem)-odb.hxx;__path__(odb_header_stem)-odb.ixx;__path__(odb_header_stem)-odb.cxx)
</ItemGroup>
<ItemGroup>
diff --git a/qt/qt4-vc11.vcxproj b/qt/qt4-vc11.vcxproj
index 229c450..34d9630 100644
--- a/qt/qt4-vc11.vcxproj
+++ b/qt/qt4-vc11.vcxproj
@@ -158,7 +158,7 @@
__custom_build_entry__(
__path__(odb_header_stem).hxx,
odb __path__(odb_header_stem).hxx,
-odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)))) __path__(odb_header_stem).hxx,
+odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options))) __path__(odb_header_stem).hxx,
__path__(odb_header_stem)-odb.hxx;__path__(odb_header_stem)-odb.ixx;__path__(odb_header_stem)-odb.cxx)
</ItemGroup>
<ItemGroup>
diff --git a/qt/qt4-vc9.vcproj b/qt/qt4-vc9.vcproj
index 8d5e82e..f8b4cce 100644
--- a/qt/qt4-vc9.vcproj
+++ b/qt/qt4-vc9.vcproj
@@ -344,7 +344,7 @@ __source_entries__(extra_sources)
__file_entry_custom_build__(
__path__(odb_header_stem).hxx,
odb __path__(odb_header_stem).hxx,
-odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)))) __path__(odb_header_stem).hxx,
+odb.exe --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options))) __path__(odb_header_stem).hxx,
__path__(odb_header_stem)-odb.hxx;__path__(odb_header_stem)-odb.ixx;__path__(odb_header_stem)-odb.cxx)
__file_entry__(__path__(odb_header_stem)-odb.hxx)
__file_entry__(__path__(odb_header_stem)-odb.ixx)
diff --git a/qt/qt5-vc10.vcxproj b/qt/qt5-vc10.vcxproj
index a185751..08696f8 100644
--- a/qt/qt5-vc10.vcxproj
+++ b/qt/qt5-vc10.vcxproj
@@ -154,7 +154,7 @@
__custom_build_entry__(
__path__(odb_header_stem).hxx,
odb __path__(odb_header_stem).hxx,
-odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)))) __path__(odb_header_stem).hxx,
+odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options))) __path__(odb_header_stem).hxx,
__path__(odb_header_stem)-odb.hxx;__path__(odb_header_stem)-odb.ixx;__path__(odb_header_stem)-odb.cxx)
</ItemGroup>
<ItemGroup>
diff --git a/qt/qt5-vc11.vcxproj b/qt/qt5-vc11.vcxproj
index 46b0448..2f96cbd 100644
--- a/qt/qt5-vc11.vcxproj
+++ b/qt/qt5-vc11.vcxproj
@@ -158,7 +158,7 @@
__custom_build_entry__(
__path__(odb_header_stem).hxx,
odb __path__(odb_header_stem).hxx,
-odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)))) __path__(odb_header_stem).hxx,
+odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options))) __path__(odb_header_stem).hxx,
__path__(odb_header_stem)-odb.hxx;__path__(odb_header_stem)-odb.ixx;__path__(odb_header_stem)-odb.cxx)
</ItemGroup>
<ItemGroup>
diff --git a/qt/qt5-vc9.vcproj b/qt/qt5-vc9.vcproj
index 7882fe6..cbfba14 100644
--- a/qt/qt5-vc9.vcproj
+++ b/qt/qt5-vc9.vcproj
@@ -344,7 +344,7 @@ __source_entries__(extra_sources)
__file_entry_custom_build__(
__path__(odb_header_stem).hxx,
odb __path__(odb_header_stem).hxx,
-odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)))) __path__(odb_header_stem).hxx,
+odb.exe --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options))) __path__(odb_header_stem).hxx,
__path__(odb_header_stem)-odb.hxx;__path__(odb_header_stem)-odb.ixx;__path__(odb_header_stem)-odb.cxx)
__file_entry__(__path__(odb_header_stem)-odb.hxx)
__file_entry__(__path__(odb_header_stem)-odb.ixx)
diff --git a/query/makefile b/query/makefile
index 7de6808..65942ac 100644
--- a/query/makefile
+++ b/query/makefile
@@ -45,11 +45,13 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
---generate-query --table-prefix query_
+$(gen) $(dist): export odb_options += --generate-schema --generate-query \
+--table-prefix query_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -60,7 +62,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/relationship/makefile b/relationship/makefile
index 24318db..8c49fe3 100644
--- a/relationship/makefile
+++ b/relationship/makefile
@@ -45,12 +45,14 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-query \
---generate-schema --generate-session --default-pointer std::tr1::shared_ptr \
+$(gen) $(dist): export odb_options += --generate-query --generate-schema \
+--generate-session --default-pointer std::tr1::shared_ptr \
--table-prefix relation_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -61,7 +63,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/schema/custom/makefile b/schema/custom/makefile
index b726a66..dddec35 100644
--- a/schema/custom/makefile
+++ b/schema/custom/makefile
@@ -45,11 +45,13 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-query \
---generate-session --default-pointer std::tr1::shared_ptr
+$(gen) $(dist): export odb_options += --generate-query --generate-session \
+--default-pointer std::tr1::shared_ptr
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -60,7 +62,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/schema/embedded/makefile b/schema/embedded/makefile
index 1748ff4..0794c48 100644
--- a/schema/embedded/makefile
+++ b/schema/embedded/makefile
@@ -45,12 +45,14 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-query \
---generate-schema --schema-format embedded --table-prefix schema_embedded_
+$(gen) $(dist): export odb_options += --generate-query --generate-schema \
+--schema-format embedded --table-prefix schema_embedded_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -61,7 +63,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/template/Makefile.am b/template/Makefile.am
index f39fbad..0cfe62d 100644
--- a/template/Makefile.am
+++ b/template/Makefile.am
@@ -47,4 +47,4 @@ ODBFLAGS += --std c++11
endif
__path__(odb_header_stem)-odb.hxx: __path__(odb_header_stem).hxx
- $(ODB) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $<
+ $(ODB) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) --database @database@ __value__(odb_options) $<
diff --git a/template/makefile b/template/makefile
index cc1bebf..f3d43bc 100644
--- a/template/makefile
+++ b/template/makefile
@@ -45,11 +45,13 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
+$(gen) $(dist): export odb_options += --generate-schema \
--table-prefix template_ #@@ CHANGE THIS
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -60,7 +62,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)
diff --git a/template/template-vc10.vcxproj b/template/template-vc10.vcxproj
index ff7be15..cda7935 100644
--- a/template/template-vc10.vcxproj
+++ b/template/template-vc10.vcxproj
@@ -154,7 +154,7 @@
__custom_build_entry__(
__path__(odb_header_stem).hxx,
odb __path__(odb_header_stem).hxx,
-odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)))) __path__(odb_header_stem).hxx,
+odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options))) __path__(odb_header_stem).hxx,
__path__(odb_header_stem)-odb.hxx;__path__(odb_header_stem)-odb.ixx;__path__(odb_header_stem)-odb.cxx)
</ItemGroup>
<ItemGroup>
diff --git a/template/template-vc11.vcxproj b/template/template-vc11.vcxproj
index d399563..4cd24bc 100644
--- a/template/template-vc11.vcxproj
+++ b/template/template-vc11.vcxproj
@@ -158,7 +158,7 @@
__custom_build_entry__(
__path__(odb_header_stem).hxx,
odb __path__(odb_header_stem).hxx,
-odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)))) __path__(odb_header_stem).hxx,
+odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options))) __path__(odb_header_stem).hxx,
__path__(odb_header_stem)-odb.hxx;__path__(odb_header_stem)-odb.ixx;__path__(odb_header_stem)-odb.cxx)
</ItemGroup>
<ItemGroup>
diff --git a/template/template-vc9.vcproj b/template/template-vc9.vcproj
index 55e59fd..dc98b07 100644
--- a/template/template-vc9.vcproj
+++ b/template/template-vc9.vcproj
@@ -344,7 +344,7 @@ __source_entries__(extra_sources)
__file_entry_custom_build__(
__path__(odb_header_stem).hxx,
odb __path__(odb_header_stem).hxx,
-odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)))) __path__(odb_header_stem).hxx,
+odb.exe --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options))) __path__(odb_header_stem).hxx,
__path__(odb_header_stem)-odb.hxx;__path__(odb_header_stem)-odb.ixx;__path__(odb_header_stem)-odb.cxx)
__file_entry__(__path__(odb_header_stem)-odb.hxx)
__file_entry__(__path__(odb_header_stem)-odb.ixx)
diff --git a/view/makefile b/view/makefile
index 4454ff8..1b769a5 100644
--- a/view/makefile
+++ b/view/makefile
@@ -45,12 +45,13 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-query \
---generate-schema --default-pointer std::tr1::shared_ptr \
---table-prefix view_
+$(gen) $(dist): export odb_options += --generate-query --generate-schema \
+--default-pointer std::tr1::shared_ptr --table-prefix view_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
+$(gen): odb_options += --database $(db_id)
+
$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
# Alias for default target.
@@ -61,7 +62,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/,,$(src_base)))
-$(dist): db_id := @database@
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export name := $(name)