From 236cd9bb1dd022e64d690c9b0080d1a15c5f61c7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 13 Jun 2013 21:57:07 +0200 Subject: Handle --database option directly in automake and VC++ projects --- boost/common/multi-index/makefile | 8 ++++---- boost/common/optional/makefile | 8 ++++---- boost/common/smart-ptr/makefile | 8 ++++---- boost/common/template/Makefile.am | 2 +- boost/common/template/makefile | 8 ++++---- boost/common/template/template-vc10.vcxproj | 2 +- boost/common/template/template-vc11.vcxproj | 2 +- boost/common/template/template-vc9.vcproj | 2 +- boost/common/unordered/makefile | 8 ++++---- boost/common/uuid/makefile | 8 ++++---- common/access/makefile | 5 +++-- common/auto/makefile | 6 +++--- common/blob/makefile | 6 +++--- common/callback/makefile | 7 ++++--- common/circular/multiple/makefile | 7 ++++--- common/circular/single/makefile | 7 ++++--- common/composite-id/makefile | 7 ++++--- common/composite/makefile | 7 ++++--- common/const-member/makefile | 6 +++--- common/const-object/makefile | 7 ++++--- common/container/basics/makefile | 5 +++-- common/container/change-tracking/makefile | 5 +++-- common/ctor/makefile | 7 ++++--- common/default/makefile | 7 ++++--- common/definition/makefile | 5 +++-- common/enum/makefile | 7 ++++--- common/erase-query/makefile | 7 ++++--- common/include/makefile | 3 +-- common/index/makefile | 6 +++--- common/inheritance/polymorphism/makefile | 7 ++++--- common/inheritance/reuse/makefile | 7 ++++--- common/inheritance/transient/makefile | 7 ++++--- common/inverse/makefile | 7 ++++--- common/lazy-ptr/makefile | 7 ++++--- common/lifecycle/makefile | 5 +++-- common/no-id/makefile | 7 ++++--- common/optimistic/makefile | 7 ++++--- common/pragma/makefile | 6 +++--- common/prepared/makefile | 7 ++++--- common/query/array/makefile | 8 ++++---- common/query/basics/makefile | 7 ++++--- common/readonly/makefile | 5 +++-- common/relationship-query/makefile | 7 ++++--- common/relationship/makefile | 7 ++++--- common/schema/embedded/basics/makefile | 5 +++-- common/schema/embedded/order/makefile | 5 +++-- common/schema/namespace/makefile | 7 ++++--- common/session/cache/makefile | 7 ++++--- common/session/custom/makefile | 9 +++++---- common/template/Makefile.am | 2 +- common/template/makefile | 5 +++-- common/template/template-vc10.vcxproj | 2 +- common/template/template-vc11.vcxproj | 2 +- common/template/template-vc9.vcproj | 2 +- common/threads/makefile | 7 ++++--- common/transaction/basics/makefile | 1 - common/transaction/callback/makefile | 1 - common/types/makefile | 5 +++-- common/view/makefile | 7 ++++--- common/virtual/makefile | 7 ++++--- common/wrapper/makefile | 6 +++--- evolution/add-column/makefile | 5 +++-- evolution/add-foreign-key/makefile | 5 +++-- evolution/add-index/makefile | 5 +++-- evolution/add-table/makefile | 5 +++-- evolution/alter-column/makefile | 5 +++-- evolution/combined/makefile | 5 +++-- evolution/data/makefile | 5 +++-- evolution/drop-column/makefile | 5 +++-- evolution/drop-foreign-key/makefile | 5 +++-- evolution/drop-index/makefile | 5 +++-- evolution/drop-table/makefile | 5 +++-- evolution/embedded/makefile | 5 +++-- evolution/template/Makefile.am | 6 +++--- evolution/template/makefile | 5 +++-- evolution/template/template-vc10.vcxproj | 6 +++--- evolution/template/template-vc11.vcxproj | 6 +++--- evolution/template/template-vc9.vcproj | 6 +++--- evolution/version/makefile | 5 +++-- qt/common/basic/makefile | 8 ++++---- qt/common/containers/basics/makefile | 8 ++++---- qt/common/containers/change-tracking/makefile | 8 ++++---- qt/common/smart-ptr/makefile | 8 ++++---- qt/common/template/Makefile.am | 2 +- qt/common/template/makefile | 8 ++++---- qt/common/template/template-qt4-vc10.vcxproj | 2 +- qt/common/template/template-qt4-vc11.vcxproj | 2 +- qt/common/template/template-qt4-vc9.vcproj | 2 +- qt/common/template/template-qt5-vc10.vcxproj | 2 +- qt/common/template/template-qt5-vc11.vcxproj | 2 +- qt/common/template/template-qt5-vc9.vcproj | 2 +- 91 files changed, 275 insertions(+), 227 deletions(-) diff --git a/boost/common/multi-index/makefile b/boost/common/multi-index/makefile index bde0ebb..fabf4b7 100644 --- a/boost/common/multi-index/makefile +++ b/boost/common/multi-index/makefile @@ -43,13 +43,14 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) \ ---profile boost/multi-index --generate-schema \ ---table-prefix boost_multi_index_ +$(gen) $(dist): export odb_options += --generate-schema \ +--profile boost/multi-index --table-prefix boost_multi_index_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.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. @@ -60,7 +61,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/boost/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/boost/common/optional/makefile b/boost/common/optional/makefile index 6dc5c31..5502501 100644 --- a/boost/common/optional/makefile +++ b/boost/common/optional/makefile @@ -43,13 +43,14 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) \ ---profile boost/optional --generate-schema --generate-query \ ---table-prefix boost_optional_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--profile boost/optional --table-prefix boost_optional_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.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. @@ -60,7 +61,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/boost/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/boost/common/smart-ptr/makefile b/boost/common/smart-ptr/makefile index 9225155..4574160 100644 --- a/boost/common/smart-ptr/makefile +++ b/boost/common/smart-ptr/makefile @@ -43,13 +43,14 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) \ ---profile boost/smart-ptr --generate-schema --generate-session \ ---table-prefix boost_smart_ptr_ +$(gen) $(dist): export odb_options += --generate-schema --generate-session \ +--profile boost/smart-ptr --table-prefix boost_smart_ptr_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.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. @@ -60,7 +61,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/boost/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/boost/common/template/Makefile.am b/boost/common/template/Makefile.am index f136cff..fcaa178 100644 --- a/boost/common/template/Makefile.am +++ b/boost/common/template/Makefile.am @@ -29,4 +29,4 @@ ODBFLAGS += --std c++11 endif test-odb.hxx: test.hxx - $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $< + $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) --database @database@ __value__(odb_options) $< diff --git a/boost/common/template/makefile b/boost/common/template/makefile index 133177e..ee924b1 100644 --- a/boost/common/template/makefile +++ b/boost/common/template/makefile @@ -43,13 +43,14 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) \ ---profile boost/version --generate-schema \ ---table-prefix boost_template_ #@@ CHANGE table prefix, boost/version +$(gen) $(dist): export odb_options += --generate-schema \ +--profile boost/version --table-prefix boost_template_ #@@ CHANGE prefix, profile $(gen): cpp_options := -I$(src_base) $(gen): $(common.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. @@ -60,7 +61,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/boost/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/boost/common/template/template-vc10.vcxproj b/boost/common/template/template-vc10.vcxproj index af7987e..3c606f9 100644 --- a/boost/common/template/template-vc10.vcxproj +++ b/boost/common/template/template-vc10.vcxproj @@ -158,7 +158,7 @@ __custom_build_entry__( test.hxx, odb test.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx, +odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx, test-odb.hxx;test-odb.ixx;test-odb.cxx) diff --git a/boost/common/template/template-vc11.vcxproj b/boost/common/template/template-vc11.vcxproj index 72fb7e3..59da6d0 100644 --- a/boost/common/template/template-vc11.vcxproj +++ b/boost/common/template/template-vc11.vcxproj @@ -162,7 +162,7 @@ __custom_build_entry__( test.hxx, odb test.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx, +odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx, test-odb.hxx;test-odb.ixx;test-odb.cxx) diff --git a/boost/common/template/template-vc9.vcproj b/boost/common/template/template-vc9.vcproj index bf900d0..b8bf4bc 100644 --- a/boost/common/template/template-vc9.vcproj +++ b/boost/common/template/template-vc9.vcproj @@ -348,7 +348,7 @@ __source_entries__(extra_sources) __file_entry_custom_build__( test.hxx, odb test.hxx, -odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\..\libcommon)) test.hxx, +odb.exe --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\..\libcommon)) test.hxx, test-odb.hxx;test-odb.ixx;test-odb.cxx) __file_entry__(test-odb.hxx) __file_entry__(test-odb.ixx) diff --git a/boost/common/unordered/makefile b/boost/common/unordered/makefile index c88a8ec..88cad51 100644 --- a/boost/common/unordered/makefile +++ b/boost/common/unordered/makefile @@ -43,13 +43,14 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) \ ---profile boost/unordered --generate-schema \ ---table-prefix boost_unordered_ +$(gen) $(dist): export odb_options += --generate-schema \ +--profile boost/unordered --table-prefix boost_unordered_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.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. @@ -60,7 +61,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/boost/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/boost/common/uuid/makefile b/boost/common/uuid/makefile index 7d39469..dbb3016 100644 --- a/boost/common/uuid/makefile +++ b/boost/common/uuid/makefile @@ -43,13 +43,14 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) \ ---profile boost/uuid --generate-schema --generate-query \ ---table-prefix boost_uuid_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--profile boost/uuid --table-prefix boost_uuid_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.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. @@ -60,7 +61,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/boost/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/access/makefile b/common/access/makefile index 7a8a86a..1cb1d2f 100644 --- a/common/access/makefile +++ b/common/access/makefile @@ -34,12 +34,14 @@ 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 access_ --accessor-regex "\#(.+)\#Get\u\1\#" \ --modifier-regex "\#(.+)\#Set\u\1\#" $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -50,7 +52,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/auto/makefile b/common/auto/makefile index c317894..ed5e3f9 100644 --- a/common/auto/makefile +++ b/common/auto/makefile @@ -34,11 +34,12 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---table-prefix auto_ +$(gen) $(dist): export odb_options += --generate-schema --table-prefix auto_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +50,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/blob/makefile b/common/blob/makefile index ee9785f..4deb80e 100644 --- a/common/blob/makefile +++ b/common/blob/makefile @@ -34,11 +34,12 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---table-prefix blob_ +$(gen) $(dist): export odb_options += --generate-schema --table-prefix blob_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +50,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/callback/makefile b/common/callback/makefile index f7b0ab6..f38fa60 100644 --- a/common/callback/makefile +++ b/common/callback/makefile @@ -34,11 +34,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 callback_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--table-prefix callback_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/circular/multiple/makefile b/common/circular/multiple/makefile index 026d6db..92784d1 100644 --- a/common/circular/multiple/makefile +++ b/common/circular/multiple/makefile @@ -34,8 +34,8 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---schema-format embedded --generate-query --table-prefix circular_m_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--schema-format embedded --table-prefix circular_m_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) @@ -43,6 +43,8 @@ $(gen): $(common.l.cpp-options) # $(gen): $(addprefix $(src_base)/,$(odb_hdr)) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -53,7 +55,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/circular/single/makefile b/common/circular/single/makefile index e5f645e..1708b6c 100644 --- a/common/circular/single/makefile +++ b/common/circular/single/makefile @@ -34,11 +34,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 circular_s_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--table-prefix circular_s_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/composite-id/makefile b/common/composite-id/makefile index 1b080e3..29227ae 100644 --- a/common/composite-id/makefile +++ b/common/composite-id/makefile @@ -34,11 +34,13 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---generate-query --generate-session --table-prefix t_comp_id_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--generate-session --table-prefix t_comp_id_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/composite/makefile b/common/composite/makefile index 1892ba1..a1fed9b 100644 --- a/common/composite/makefile +++ b/common/composite/makefile @@ -34,11 +34,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 t_comp_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--table-prefix t_comp_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/const-member/makefile b/common/const-member/makefile index 83a398d..fc855c5 100644 --- a/common/const-member/makefile +++ b/common/const-member/makefile @@ -34,11 +34,12 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---table-prefix constm_ +$(gen) $(dist): export odb_options += --generate-schema --table-prefix constm_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +50,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/const-object/makefile b/common/const-object/makefile index 043ab76..d8015cf 100644 --- a/common/const-object/makefile +++ b/common/const-object/makefile @@ -34,11 +34,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 consto_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--table-prefix consto_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/container/basics/makefile b/common/container/basics/makefile index baddb9f..d6c4949 100644 --- a/common/container/basics/makefile +++ b/common/container/basics/makefile @@ -34,11 +34,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 t_cont_bs_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/container/change-tracking/makefile b/common/container/change-tracking/makefile index b24f8ea..de4c148 100644 --- a/common/container/change-tracking/makefile +++ b/common/container/change-tracking/makefile @@ -34,11 +34,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 t_cont_changet_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/ctor/makefile b/common/ctor/makefile index 67f5656..a94a113 100644 --- a/common/ctor/makefile +++ b/common/ctor/makefile @@ -34,11 +34,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 ctor_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--table-prefix ctor_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/default/makefile b/common/default/makefile index 27ad049..44e6d04 100644 --- a/common/default/makefile +++ b/common/default/makefile @@ -34,11 +34,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 default_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--table-prefix default_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/definition/makefile b/common/definition/makefile index 837d5d6..370a739 100644 --- a/common/definition/makefile +++ b/common/definition/makefile @@ -34,7 +34,7 @@ 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 definition_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) @@ -43,6 +43,8 @@ $(gen): $(common.l.cpp-options) # $(gen): $(src_base)/time-mapping.hxx +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -53,7 +55,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/enum/makefile b/common/enum/makefile index 466498f..466ad98 100644 --- a/common/enum/makefile +++ b/common/enum/makefile @@ -34,11 +34,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 enum_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--table-prefix enum_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/erase-query/makefile b/common/erase-query/makefile index 378103f..949064e 100644 --- a/common/erase-query/makefile +++ b/common/erase-query/makefile @@ -34,11 +34,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 erase_query_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--table-prefix erase_query_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/include/makefile b/common/include/makefile index 19d2705..eb25d9f 100644 --- a/common/include/makefile +++ b/common/include/makefile @@ -35,8 +35,7 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) \ ---table-prefix include_ +$(gen): odb_options += --database $(db_id) --table-prefix include_ $(gen): cpp_options := -I$(out_base) -I$(src_base)/.. -I$(src_base)/../.. $(gen): $(common.l.cpp-options) diff --git a/common/index/makefile b/common/index/makefile index 82e0835..610aec3 100644 --- a/common/index/makefile +++ b/common/index/makefile @@ -34,11 +34,12 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---table-prefix index_ +$(gen) $(dist): export odb_options += --generate-schema --table-prefix index_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +50,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/inheritance/polymorphism/makefile b/common/inheritance/polymorphism/makefile index 2be6810..d7a8e2f 100644 --- a/common/inheritance/polymorphism/makefile +++ b/common/inheritance/polymorphism/makefile @@ -36,11 +36,13 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---generate-query --generate-prepared --table-prefix inhrt_p_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--generate-prepared --table-prefix inhrt_p_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -51,7 +53,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/inheritance/reuse/makefile b/common/inheritance/reuse/makefile index f116b0d..874d48b 100644 --- a/common/inheritance/reuse/makefile +++ b/common/inheritance/reuse/makefile @@ -34,11 +34,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 inhrt_r_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--table-prefix inhrt_r_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/inheritance/transient/makefile b/common/inheritance/transient/makefile index 65b1afa..f20894e 100644 --- a/common/inheritance/transient/makefile +++ b/common/inheritance/transient/makefile @@ -34,11 +34,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 inhrt_t_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--table-prefix inhrt_t_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/inverse/makefile b/common/inverse/makefile index 6089d8d..a1c3202 100644 --- a/common/inverse/makefile +++ b/common/inverse/makefile @@ -34,11 +34,13 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---generate-query --generate-session --table-prefix t_inverse_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--generate-session --table-prefix t_inverse_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/lazy-ptr/makefile b/common/lazy-ptr/makefile index b5bafcf..cfb7010 100644 --- a/common/lazy-ptr/makefile +++ b/common/lazy-ptr/makefile @@ -34,11 +34,13 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---generate-session --table-prefix lazy_ptr_ +$(gen) $(dist): export odb_options += --generate-schema --generate-session \ +--table-prefix lazy_ptr_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/lifecycle/makefile b/common/lifecycle/makefile index 4caff60..3d700d9 100644 --- a/common/lifecycle/makefile +++ b/common/lifecycle/makefile @@ -34,11 +34,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 lifecycle_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/no-id/makefile b/common/no-id/makefile index d56c120..439e883 100644 --- a/common/no-id/makefile +++ b/common/no-id/makefile @@ -34,11 +34,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 no_id_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--table-prefix no_id_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/optimistic/makefile b/common/optimistic/makefile index 9b5f06a..8da011e 100644 --- a/common/optimistic/makefile +++ b/common/optimistic/makefile @@ -34,11 +34,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 t_optimistic_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--table-prefix t_optimistic_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/pragma/makefile b/common/pragma/makefile index 563809c..bb54f7a 100644 --- a/common/pragma/makefile +++ b/common/pragma/makefile @@ -34,11 +34,12 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) \ ---table-prefix pragma_ +$(gen) $(dist): export odb_options += --table-prefix pragma_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +50,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/prepared/makefile b/common/prepared/makefile index 4c2bf28..72d0974 100644 --- a/common/prepared/makefile +++ b/common/prepared/makefile @@ -34,11 +34,13 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---generate-query --generate-prepared --omit-unprepared --table-prefix prepared_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--generate-prepared --omit-unprepared --table-prefix prepared_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/query/array/makefile b/common/query/array/makefile index 0d65398..3708b9d 100644 --- a/common/query/array/makefile +++ b/common/query/array/makefile @@ -34,12 +34,13 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---generate-query --generate-prepared --sql-name-case oracle:upper \ ---table-prefix t_query_array_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--generate-prepared --sql-name-case oracle:upper --table-prefix t_query_array_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -50,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/query/basics/makefile b/common/query/basics/makefile index 2952b21..ec63728 100644 --- a/common/query/basics/makefile +++ b/common/query/basics/makefile @@ -34,11 +34,13 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---generate-query --generate-prepared --table-prefix t_query_basics_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--generate-prepared --table-prefix t_query_basics_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/readonly/makefile b/common/readonly/makefile index adde950..3c586bd 100644 --- a/common/readonly/makefile +++ b/common/readonly/makefile @@ -34,11 +34,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 readonly_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/relationship-query/makefile b/common/relationship-query/makefile index 164b0f0..56994b5 100644 --- a/common/relationship-query/makefile +++ b/common/relationship-query/makefile @@ -34,11 +34,13 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---generate-query --generate-session --table-prefix relationship_query_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--generate-session --table-prefix relationship_query_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/relationship/makefile b/common/relationship/makefile index 4babd5e..c469a93 100644 --- a/common/relationship/makefile +++ b/common/relationship/makefile @@ -34,11 +34,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 t_relationship_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--table-prefix t_relationship_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/schema/embedded/basics/makefile b/common/schema/embedded/basics/makefile index 7989195..96e987a 100644 --- a/common/schema/embedded/basics/makefile +++ b/common/schema/embedded/basics/makefile @@ -34,11 +34,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 \ --schema-format embedded --schema-name test --table-prefix schema_embd_bscs_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/schema/embedded/order/makefile b/common/schema/embedded/order/makefile index e8d840d..e8897d5 100644 --- a/common/schema/embedded/order/makefile +++ b/common/schema/embedded/order/makefile @@ -34,7 +34,7 @@ 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 \ --schema-format embedded --table-prefix schema_embd_ordr_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) @@ -43,6 +43,8 @@ $(gen): $(common.l.cpp-options) # $(gen): $(addprefix $(src_base)/,$(odb_hdr)) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -53,7 +55,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/schema/namespace/makefile b/common/schema/namespace/makefile index c1157c9..38f6be1 100644 --- a/common/schema/namespace/makefile +++ b/common/schema/namespace/makefile @@ -34,11 +34,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 schema_ns_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--table-prefix schema_ns_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/session/cache/makefile b/common/session/cache/makefile index c26b394..3219565 100644 --- a/common/session/cache/makefile +++ b/common/session/cache/makefile @@ -34,11 +34,13 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---generate-session --table-prefix session_cache_ +$(gen) $(dist): export odb_options += --generate-schema --generate-session \ +--table-prefix session_cache_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/session/custom/makefile b/common/session/custom/makefile index e822b7a..2342b04 100644 --- a/common/session/custom/makefile +++ b/common/session/custom/makefile @@ -34,12 +34,14 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---generate-session --session-type ::session --hxx-prologue \ -'\#include "session.hxx"' --table-prefix session_custom_ +$(gen) $(dist): export odb_options += --generate-schema --generate-session \ +--session-type ::session --hxx-prologue '\#include "session.hxx"' \ +--table-prefix session_custom_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -50,7 +52,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): export extra_headers := session.hxx session.txx diff --git a/common/template/Makefile.am b/common/template/Makefile.am index 3571bc2..50ad1bc 100644 --- a/common/template/Makefile.am +++ b/common/template/Makefile.am @@ -35,6 +35,6 @@ BUILT_SOURCES += __f-odb.hxx CLEANFILES += __f-odb.hxx __f-odb.ixx __f-odb.cxx __f-odb.hxx: __f.hxx - $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $< + $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) --database @database@ __value__(odb_options) $< )) diff --git a/common/template/makefile b/common/template/makefile index 63768df..0d8cf60 100644 --- a/common/template/makefile +++ b/common/template/makefile @@ -34,11 +34,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): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/template/template-vc10.vcxproj b/common/template/template-vc10.vcxproj index c1229ea..fb21140 100644 --- a/common/template/template-vc10.vcxproj +++ b/common/template/template-vc10.vcxproj @@ -161,7 +161,7 @@ m4_dnl __custom_build_entry__( __f.hxx, odb __f.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\libcommon)) __f.hxx, +odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\libcommon)) __f.hxx, __f-odb.hxx;__f-odb.ixx;__f-odb.cxx) ) ) diff --git a/common/template/template-vc11.vcxproj b/common/template/template-vc11.vcxproj index 048f160..c1f1b0d 100644 --- a/common/template/template-vc11.vcxproj +++ b/common/template/template-vc11.vcxproj @@ -165,7 +165,7 @@ m4_dnl __custom_build_entry__( __f.hxx, odb __f.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\libcommon)) __f.hxx, +odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\libcommon)) __f.hxx, __f-odb.hxx;__f-odb.ixx;__f-odb.cxx) ) ) diff --git a/common/template/template-vc9.vcproj b/common/template/template-vc9.vcproj index a09174c..976b870 100644 --- a/common/template/template-vc9.vcproj +++ b/common/template/template-vc9.vcproj @@ -352,7 +352,7 @@ __ifelse__(__value__(odb_options),,, __file_entry_custom_build__( __f.hxx, odb __f.hxx, -odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\libcommon)) __f.hxx, +odb.exe --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\libcommon)) __f.hxx, __f-odb.hxx;__f-odb.ixx;__f-odb.cxx) __file_entry__(__f-odb.hxx) __file_entry__(__f-odb.ixx))) diff --git a/common/threads/makefile b/common/threads/makefile index cfd0e3f..91adc8d 100644 --- a/common/threads/makefile +++ b/common/threads/makefile @@ -34,11 +34,13 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---generate-query --generate-prepared --table-prefix threads_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--generate-prepared --table-prefix threads_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/transaction/basics/makefile b/common/transaction/basics/makefile index b384d47..a399e8c 100644 --- a/common/transaction/basics/makefile +++ b/common/transaction/basics/makefile @@ -32,7 +32,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): data_dist := test.std $(dist): export name := $(name) diff --git a/common/transaction/callback/makefile b/common/transaction/callback/makefile index f4ed18b..e60c936 100644 --- a/common/transaction/callback/makefile +++ b/common/transaction/callback/makefile @@ -32,7 +32,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): data_dist := test.std $(dist): export name := $(name) diff --git a/common/types/makefile b/common/types/makefile index ec58785..f47e4d4 100644 --- a/common/types/makefile +++ b/common/types/makefile @@ -34,10 +34,12 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --table-prefix types_ +$(gen) $(dist): export odb_options += --table-prefix types_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -48,7 +50,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/view/makefile b/common/view/makefile index bc74e97..6aad221 100644 --- a/common/view/makefile +++ b/common/view/makefile @@ -34,11 +34,13 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---generate-query --generate-prepared --table-prefix t_view_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--generate-prepared --table-prefix t_view_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/virtual/makefile b/common/virtual/makefile index a98a69d..168c969 100644 --- a/common/virtual/makefile +++ b/common/virtual/makefile @@ -34,11 +34,13 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---generate-query --generate-session --table-prefix virtual_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--generate-session --table-prefix virtual_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +51,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/common/wrapper/makefile b/common/wrapper/makefile index 8511bd9..68492c1 100644 --- a/common/wrapper/makefile +++ b/common/wrapper/makefile @@ -34,11 +34,12 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \ ---table-prefix wrapper_ +$(gen) $(dist): export odb_options += --generate-schema --table-prefix wrapper_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.l.cpp-options) +$(gen): odb_options += --database $(db_id) + $(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) # Alias for default target. @@ -49,7 +50,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/evolution/add-column/makefile b/evolution/add-column/makefile index a49ff52..7da8b71 100644 --- a/evolution/add-column/makefile +++ b/evolution/add-column/makefile @@ -45,8 +45,9 @@ test3-003-pre.sql test3-003-post.sql $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): odb_common_options = --database $(db_id) --generate-query \ +$(gen) $(dist): odb_common_options = --generate-query \ --generate-schema --at-once --table-prefix evo_add_c_ +$(gen): odb_common_options += --database $(db_id) $(gen1) $(dist): export odb_options1 = $(odb_common_options) --init-changelog $(gen2) $(dist): export odb_options2 = $(odb_common_options) --omit-create \ --schema-name 2 --suppress-migration @@ -74,7 +75,7 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/evolution/,,$(src_base))) -$(dist): db_id := @database@ + $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): export extra_headers := model.hxx diff --git a/evolution/add-foreign-key/makefile b/evolution/add-foreign-key/makefile index d3c9873..3446e5b 100644 --- a/evolution/add-foreign-key/makefile +++ b/evolution/add-foreign-key/makefile @@ -45,9 +45,10 @@ test3-003-pre.sql test3-003-post.sql $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): odb_common_options = --database $(db_id) --generate-query \ +$(gen) $(dist): odb_common_options = --generate-query \ --generate-schema --at-once --fkeys-deferrable-mode not_deferrable \ --table-prefix evo_add_fk_ +$(gen): odb_common_options += --database $(db_id) $(gen1) $(dist): export odb_options1 = $(odb_common_options) --init-changelog $(gen2) $(dist): export odb_options2 = $(odb_common_options) --omit-create \ --schema-name 2 --suppress-migration @@ -75,7 +76,7 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/evolution/,,$(src_base))) -$(dist): db_id := @database@ + $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): export extra_headers := model.hxx diff --git a/evolution/add-index/makefile b/evolution/add-index/makefile index c46222f..50a6673 100644 --- a/evolution/add-index/makefile +++ b/evolution/add-index/makefile @@ -45,8 +45,9 @@ test3-003-pre.sql test3-003-post.sql $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): odb_common_options = --database $(db_id) --generate-query \ +$(gen) $(dist): odb_common_options = --generate-query \ --generate-schema --at-once --table-prefix evo_add_i_ +$(gen): odb_common_options += --database $(db_id) $(gen1) $(dist): export odb_options1 = $(odb_common_options) --init-changelog $(gen2) $(dist): export odb_options2 = $(odb_common_options) --omit-create \ --schema-name 2 --suppress-migration @@ -74,7 +75,7 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/evolution/,,$(src_base))) -$(dist): db_id := @database@ + $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): export extra_headers := model.hxx diff --git a/evolution/add-table/makefile b/evolution/add-table/makefile index 4d92861..a57e56e 100644 --- a/evolution/add-table/makefile +++ b/evolution/add-table/makefile @@ -45,8 +45,9 @@ test3-003-pre.sql test3-003-post.sql $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): odb_common_options = --database $(db_id) --generate-query \ +$(gen) $(dist): odb_common_options = --generate-query \ --generate-schema --at-once --table-prefix evo_add_t_ +$(gen): odb_common_options += --database $(db_id) $(gen1) $(dist): export odb_options1 = $(odb_common_options) --init-changelog $(gen2) $(dist): export odb_options2 = $(odb_common_options) --omit-create \ --schema-name 2 --suppress-migration @@ -74,7 +75,7 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/evolution/,,$(src_base))) -$(dist): db_id := @database@ + $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): export extra_headers := model.hxx diff --git a/evolution/alter-column/makefile b/evolution/alter-column/makefile index 3c198a2..998c915 100644 --- a/evolution/alter-column/makefile +++ b/evolution/alter-column/makefile @@ -45,8 +45,9 @@ test3-003-pre.sql test3-003-post.sql $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): odb_common_options = --database $(db_id) --generate-query \ +$(gen) $(dist): odb_common_options = --generate-query \ --generate-schema --at-once --table-prefix evo_alter_c_ +$(gen): odb_common_options += --database $(db_id) $(gen1) $(dist): export odb_options1 = $(odb_common_options) --init-changelog $(gen2) $(dist): export odb_options2 = $(odb_common_options) --omit-create \ --schema-name 2 --suppress-migration @@ -74,7 +75,7 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/evolution/,,$(src_base))) -$(dist): db_id := @database@ + $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): export extra_headers := model.hxx diff --git a/evolution/combined/makefile b/evolution/combined/makefile index b243f60..33c5176 100644 --- a/evolution/combined/makefile +++ b/evolution/combined/makefile @@ -45,8 +45,9 @@ test3-003-pre.sql test3-003-post.sql $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): odb_common_options = --database $(db_id) --generate-query \ +$(gen) $(dist): odb_common_options = --generate-query \ --generate-schema --at-once --table-prefix evo_comb_ +$(gen): odb_common_options += --database $(db_id) $(gen1) $(dist): export odb_options1 = $(odb_common_options) --init-changelog $(gen2) $(dist): export odb_options2 = $(odb_common_options) --omit-create \ --schema-name 2 --suppress-migration @@ -74,7 +75,7 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/evolution/,,$(src_base))) -$(dist): db_id := @database@ + $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): export extra_headers := model.hxx diff --git a/evolution/data/makefile b/evolution/data/makefile index ea711ed..6787527 100644 --- a/evolution/data/makefile +++ b/evolution/data/makefile @@ -43,8 +43,9 @@ gen := $(gen1) $(gen2) $(gen3) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): odb_common_options = --database $(db_id) --generate-query \ +$(gen) $(dist): odb_common_options = --generate-query \ --generate-schema --at-once --table-prefix evo_data_ +$(gen): odb_common_options += --database $(db_id) $(gen1) $(dist): export odb_options1 = $(odb_common_options) --init-changelog $(gen2) $(dist): export odb_options2 = $(odb_common_options) --omit-create \ --schema-name 2 --suppress-migration @@ -72,7 +73,7 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/evolution/,,$(src_base))) -$(dist): db_id := @database@ + $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): export extra_headers := model.hxx diff --git a/evolution/drop-column/makefile b/evolution/drop-column/makefile index 6f6cc6b..26b31ac 100644 --- a/evolution/drop-column/makefile +++ b/evolution/drop-column/makefile @@ -45,8 +45,9 @@ test3-003-pre.sql test3-003-post.sql $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): odb_common_options = --database $(db_id) --generate-query \ +$(gen) $(dist): odb_common_options = --generate-query \ --generate-schema --at-once --table-prefix evo_drop_c_ +$(gen): odb_common_options += --database $(db_id) $(gen1) $(dist): export odb_options1 = $(odb_common_options) --init-changelog $(gen2) $(dist): export odb_options2 = $(odb_common_options) --omit-create \ --schema-name 2 --suppress-migration @@ -74,7 +75,7 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/evolution/,,$(src_base))) -$(dist): db_id := @database@ + $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): export extra_headers := model.hxx diff --git a/evolution/drop-foreign-key/makefile b/evolution/drop-foreign-key/makefile index b22ce9d..78d1602 100644 --- a/evolution/drop-foreign-key/makefile +++ b/evolution/drop-foreign-key/makefile @@ -45,9 +45,10 @@ test3-003-pre.sql test3-003-post.sql $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): odb_common_options = --database $(db_id) --generate-query \ +$(gen) $(dist): odb_common_options = --generate-query \ --generate-schema --at-once --fkeys-deferrable-mode not_deferrable \ --table-prefix evo_drop_fk_ +$(gen): odb_common_options += --database $(db_id) $(gen1) $(dist): export odb_options1 = $(odb_common_options) --init-changelog $(gen2) $(dist): export odb_options2 = $(odb_common_options) --omit-create \ --schema-name 2 --suppress-migration @@ -75,7 +76,7 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/evolution/,,$(src_base))) -$(dist): db_id := @database@ + $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): export extra_headers := model.hxx diff --git a/evolution/drop-index/makefile b/evolution/drop-index/makefile index 072e830..2e849c1 100644 --- a/evolution/drop-index/makefile +++ b/evolution/drop-index/makefile @@ -45,8 +45,9 @@ test3-003-pre.sql test3-003-post.sql $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): odb_common_options = --database $(db_id) --generate-query \ +$(gen) $(dist): odb_common_options = --generate-query \ --generate-schema --at-once --table-prefix evo_drop_i_ +$(gen): odb_common_options += --database $(db_id) $(gen1) $(dist): export odb_options1 = $(odb_common_options) --init-changelog $(gen2) $(dist): export odb_options2 = $(odb_common_options) --omit-create \ --schema-name 2 --suppress-migration @@ -74,7 +75,7 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/evolution/,,$(src_base))) -$(dist): db_id := @database@ + $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): export extra_headers := model.hxx diff --git a/evolution/drop-table/makefile b/evolution/drop-table/makefile index 9165559..ff6014f 100644 --- a/evolution/drop-table/makefile +++ b/evolution/drop-table/makefile @@ -45,8 +45,9 @@ test3-003-pre.sql test3-003-post.sql $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): odb_common_options = --database $(db_id) --generate-query \ +$(gen) $(dist): odb_common_options = --generate-query \ --generate-schema --at-once --table-prefix evo_drop_t_ +$(gen): odb_common_options += --database $(db_id) $(gen1) $(dist): export odb_options1 = $(odb_common_options) --init-changelog $(gen2) $(dist): export odb_options2 = $(odb_common_options) --omit-create \ --schema-name 2 --suppress-migration @@ -74,7 +75,7 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/evolution/,,$(src_base))) -$(dist): db_id := @database@ + $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): export extra_headers := model.hxx diff --git a/evolution/embedded/makefile b/evolution/embedded/makefile index e8f5892..8503ce7 100644 --- a/evolution/embedded/makefile +++ b/evolution/embedded/makefile @@ -43,8 +43,9 @@ gen := $(gen1) $(gen2) $(gen3) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): odb_common_options = --database $(db_id) --generate-query \ +$(gen) $(dist): odb_common_options = --generate-query \ --generate-schema --schema-format embedded --at-once --table-prefix evo_embedded_ +$(gen): odb_common_options += --database $(db_id) $(gen1) $(dist): export odb_options1 = $(odb_common_options) --init-changelog $(gen2) $(dist): export odb_options2 = $(odb_common_options) --omit-create \ --schema-name 2 --suppress-migration @@ -72,7 +73,7 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/evolution/,,$(src_base))) -$(dist): db_id := @database@ + $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): export extra_headers := model.hxx diff --git a/evolution/template/Makefile.am b/evolution/template/Makefile.am index 2d71bc3..b81650d 100644 --- a/evolution/template/Makefile.am +++ b/evolution/template/Makefile.am @@ -29,7 +29,7 @@ BUILT_SOURCES = test1-odb.hxx CLEANFILES = test1-odb.hxx test1-odb.ixx test1-odb.cxx test1.sql model.xml test1-odb.hxx: test1.hxx - $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options1) --changelog model.xml $< + $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) --database @database@ __value__(odb_options1) --changelog model.xml $< # test2.hxx # @@ -39,7 +39,7 @@ BUILT_SOURCES = test2-odb.hxx CLEANFILES = test2-odb.hxx test2-odb.ixx test2-odb.cxx test2.sql test2-odb.hxx: test2.hxx - $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options2) --changelog model.xml $< + $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) --database @database@ __value__(odb_options2) --changelog model.xml $< # test3.hxx # @@ -50,7 +50,7 @@ CLEANFILES += test3-odb.hxx test3-odb.ixx test3-odb.cxx test3.sql \ test3-002-pre.sql test3-002-post.sql test3-003-pre.sql test3-003-post.sql test3-odb.hxx: test3.hxx - $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options3) --changelog model.xml $< + $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) --database @database@ __value__(odb_options3) --changelog model.xml $< # Make sure testN.hxx are compiled serially since they share the # changelog. Also add dependency on model.hxx diff --git a/evolution/template/makefile b/evolution/template/makefile index 9df8125..88bf49a 100644 --- a/evolution/template/makefile +++ b/evolution/template/makefile @@ -45,8 +45,9 @@ test3-003-pre.sql test3-003-post.sql $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): odb_common_options = --database $(db_id) --generate-query \ +$(gen) $(dist): odb_common_options = --generate-query \ --generate-schema --at-once --table-prefix evo_template_ #@@ CHANGE THIS +$(gen): odb_common_options += --database $(db_id) $(gen1) $(dist): export odb_options1 = $(odb_common_options) --init-changelog $(gen2) $(dist): export odb_options2 = $(odb_common_options) --omit-create \ --schema-name 2 --suppress-migration @@ -74,7 +75,7 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/evolution/,,$(src_base))) -$(dist): db_id := @database@ + $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): export extra_headers := model.hxx diff --git a/evolution/template/template-vc10.vcxproj b/evolution/template/template-vc10.vcxproj index 70b8687..a98b681 100644 --- a/evolution/template/template-vc10.vcxproj +++ b/evolution/template/template-vc10.vcxproj @@ -158,19 +158,19 @@ __custom_build_entry__( test1.hxx, odb test1.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options1), @database@, __value__(database)) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\libcommon)) test1.hxx, +odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options1) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\libcommon)) test1.hxx, test1-odb.hxx;test1-odb.ixx;test1-odb.cxx;test1.sql;model.xml, model.hxx) __custom_build_entry__( test2.hxx, odb test2.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options2), @database@, __value__(database)) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\libcommon)) test2.hxx, +odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options2) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\libcommon)) test2.hxx, test2-odb.hxx;test2-odb.ixx;test2-odb.cxx;test2.sql;model.xml, test1-odb.hxx;model.hxx) __custom_build_entry__( test3.hxx, odb test3.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options3), @database@, __value__(database)) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\libcommon)) test3.hxx, +odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options3) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\libcommon)) test3.hxx, test3-odb.hxx;test3-odb.ixx;test3-odb.cxx;test3.sql;test3-002-pre.sql;test3-002-post.sql;test3-003-pre.sql;test3-003-post.sql, test2-odb.hxx;model.hxx) diff --git a/evolution/template/template-vc11.vcxproj b/evolution/template/template-vc11.vcxproj index 5895a46..0bdafd9 100644 --- a/evolution/template/template-vc11.vcxproj +++ b/evolution/template/template-vc11.vcxproj @@ -162,19 +162,19 @@ __custom_build_entry__( test1.hxx, odb test1.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options1), @database@, __value__(database)) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1700 -I$(SolutionDir)\..\libcommon)) test1.hxx, +odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options1) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1700 -I$(SolutionDir)\..\libcommon)) test1.hxx, test1-odb.hxx;test1-odb.ixx;test1-odb.cxx;test1.sql;model.xml, model.hxx) __custom_build_entry__( test2.hxx, odb test2.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options2), @database@, __value__(database)) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1700 -I$(SolutionDir)\..\libcommon)) test2.hxx, +odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options2) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1700 -I$(SolutionDir)\..\libcommon)) test2.hxx, test2-odb.hxx;test2-odb.ixx;test2-odb.cxx;test2.sql;model.xml, test1-odb.hxx;model.hxx) __custom_build_entry__( test3.hxx, odb test3.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options3), @database@, __value__(database)) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1700 -I$(SolutionDir)\..\libcommon)) test3.hxx, +odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options3) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1700 -I$(SolutionDir)\..\libcommon)) test3.hxx, test3-odb.hxx;test3-odb.ixx;test3-odb.cxx;test3.sql;test3-002-pre.sql;test3-002-post.sql;test3-003-pre.sql;test3-003-post.sql, test2-odb.hxx;model.hxx) diff --git a/evolution/template/template-vc9.vcproj b/evolution/template/template-vc9.vcproj index 4c9b465..536f154 100644 --- a/evolution/template/template-vc9.vcproj +++ b/evolution/template/template-vc9.vcproj @@ -350,7 +350,7 @@ __source_entries__(extra_sources) __file_entry_custom_build__( test1.hxx, odb test1.hxx, -odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options1), @database@, __value__(database)) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\libcommon)) test1.hxx, +odb.exe --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options1) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\libcommon)) test1.hxx, test1-odb.hxx;test1-odb.ixx;test1-odb.cxx;test1.sql;model.xml, model.hxx) __file_entry__(test1-odb.hxx) @@ -358,7 +358,7 @@ __file_entry__(test1-odb.ixx) __file_entry_custom_build__( test2.hxx, odb test2.hxx, -odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options2), @database@, __value__(database)) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\libcommon)) test2.hxx, +odb.exe --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options2) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\libcommon)) test2.hxx, test2-odb.hxx;test2-odb.ixx;test2-odb.cxx;test2.sql;model.xml, test1-odb.hxx;model.hxx) __file_entry__(test2-odb.hxx) @@ -366,7 +366,7 @@ __file_entry__(test2-odb.ixx) __file_entry_custom_build__( test3.hxx, odb test3.hxx, -odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options3), @database@, __value__(database)) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\libcommon)) test3.hxx, +odb.exe --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options3) --changelog model.xml -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\libcommon)) test3.hxx, test3-odb.hxx;test3-odb.ixx;test3-odb.cxx;test3.sql;test3-002-pre.sql;test3-002-post.sql;test3-003-pre.sql;test3-003-post.sql, test2-odb.hxx;model.hxx) __file_entry__(test3-odb.hxx) diff --git a/evolution/version/makefile b/evolution/version/makefile index fa365d6..bcb4819 100644 --- a/evolution/version/makefile +++ b/evolution/version/makefile @@ -45,8 +45,9 @@ test3-003-pre.sql test3-003-post.sql $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): odb_common_options = --database $(db_id) --generate-query \ +$(gen) $(dist): odb_common_options = --generate-query \ --generate-schema --at-once --table-prefix evo_version_ +$(gen): odb_common_options += --database $(db_id) $(gen1) $(dist): export odb_options1 = $(odb_common_options) --init-changelog $(gen2) $(dist): export odb_options2 = $(odb_common_options) --omit-create \ --schema-name 2 --suppress-migration @@ -74,7 +75,7 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/evolution/,,$(src_base))) -$(dist): db_id := @database@ + $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): export extra_headers := model.hxx diff --git a/qt/common/basic/makefile b/qt/common/basic/makefile index eea4f93..05d3375 100644 --- a/qt/common/basic/makefile +++ b/qt/common/basic/makefile @@ -43,13 +43,14 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) \ ---profile qt/basic --generate-schema --generate-query \ ---table-prefix qt_basic_ +$(gen) $(dist): export odb_options += --generate-schema --generate-query \ +--profile qt/basic --table-prefix qt_basic_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.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. @@ -60,7 +61,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/qt/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/qt/common/containers/basics/makefile b/qt/common/containers/basics/makefile index a992a2f..a14a29f 100644 --- a/qt/common/containers/basics/makefile +++ b/qt/common/containers/basics/makefile @@ -43,13 +43,14 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) \ ---profile qt/containers --profile qt/basic --generate-schema \ ---table-prefix qt_cont_bs_ +$(gen) $(dist): export odb_options += --generate-schema \ +--profile qt/containers --profile qt/basic --table-prefix qt_cont_bs_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.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. @@ -60,7 +61,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/qt/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/qt/common/containers/change-tracking/makefile b/qt/common/containers/change-tracking/makefile index c14aeaf..4cfee92 100644 --- a/qt/common/containers/change-tracking/makefile +++ b/qt/common/containers/change-tracking/makefile @@ -43,13 +43,14 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) \ ---profile qt/containers --profile qt/basic --generate-schema \ ---table-prefix qt_cont_ct_ +$(gen) $(dist): export odb_options += --generate-schema \ +--profile qt/containers --profile qt/basic --table-prefix qt_cont_ct_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.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. @@ -60,7 +61,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/qt/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/qt/common/smart-ptr/makefile b/qt/common/smart-ptr/makefile index 2619fd2..b539e08 100644 --- a/qt/common/smart-ptr/makefile +++ b/qt/common/smart-ptr/makefile @@ -43,13 +43,14 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) \ ---profile qt/smart-ptr --generate-schema --generate-session \ ---table-prefix qt_smart_ptr_ +$(gen) $(dist): export odb_options += --generate-schema --generate-session \ +--profile qt/smart-ptr --table-prefix qt_smart_ptr_ $(gen): cpp_options := -I$(src_base) $(gen): $(common.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. @@ -60,7 +61,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/qt/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/qt/common/template/Makefile.am b/qt/common/template/Makefile.am index 80ef463..c65ad21 100644 --- a/qt/common/template/Makefile.am +++ b/qt/common/template/Makefile.am @@ -29,4 +29,4 @@ ODBFLAGS += --std c++11 endif test-odb.hxx: test.hxx - $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $< + $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) --database @database@ __value__(odb_options) $< diff --git a/qt/common/template/makefile b/qt/common/template/makefile index 3ec25d2..9836dca 100644 --- a/qt/common/template/makefile +++ b/qt/common/template/makefile @@ -43,13 +43,14 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): $(odb) $(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database $(db_id) \ ---profile qt/version --generate-schema \ ---table-prefix qt_template_ #@@ CHANGE table prefix, qt/version +$(gen) $(dist): export odb_options += --generate-schema \ +--profile qt/version --table-prefix qt_template_ #@@ CHANGE prefix, profile $(gen): cpp_options := -I$(src_base) $(gen): $(common.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. @@ -60,7 +61,6 @@ $(out_base)/: $(driver) # name := $(subst /,-,$(subst $(src_root)/qt/common/,,$(src_base))) -$(dist): db_id := @database@ $(dist): sources := $(cxx_tun) $(dist): headers := $(odb_hdr) $(dist): data_dist := test.std diff --git a/qt/common/template/template-qt4-vc10.vcxproj b/qt/common/template/template-qt4-vc10.vcxproj index 1c4b458..fddcac3 100644 --- a/qt/common/template/template-qt4-vc10.vcxproj +++ b/qt/common/template/template-qt4-vc10.vcxproj @@ -158,7 +158,7 @@ __custom_build_entry__( test.hxx, odb test.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx, +odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx, test-odb.hxx;test-odb.ixx;test-odb.cxx) diff --git a/qt/common/template/template-qt4-vc11.vcxproj b/qt/common/template/template-qt4-vc11.vcxproj index b9a0bc4..cecfe53 100644 --- a/qt/common/template/template-qt4-vc11.vcxproj +++ b/qt/common/template/template-qt4-vc11.vcxproj @@ -162,7 +162,7 @@ __custom_build_entry__( test.hxx, odb test.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx, +odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx, test-odb.hxx;test-odb.ixx;test-odb.cxx) diff --git a/qt/common/template/template-qt4-vc9.vcproj b/qt/common/template/template-qt4-vc9.vcproj index e8a6a3c..b37675e 100644 --- a/qt/common/template/template-qt4-vc9.vcproj +++ b/qt/common/template/template-qt4-vc9.vcproj @@ -348,7 +348,7 @@ __source_entries__(extra_sources) __file_entry_custom_build__( test.hxx, odb test.hxx, -odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\..\libcommon)) test.hxx, +odb.exe --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\..\libcommon)) test.hxx, test-odb.hxx;test-odb.ixx;test-odb.cxx) __file_entry__(test-odb.hxx) __file_entry__(test-odb.ixx) diff --git a/qt/common/template/template-qt5-vc10.vcxproj b/qt/common/template/template-qt5-vc10.vcxproj index 2e721ee..add071a 100644 --- a/qt/common/template/template-qt5-vc10.vcxproj +++ b/qt/common/template/template-qt5-vc10.vcxproj @@ -158,7 +158,7 @@ __custom_build_entry__( test.hxx, odb test.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx, +odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx, test-odb.hxx;test-odb.ixx;test-odb.cxx) diff --git a/qt/common/template/template-qt5-vc11.vcxproj b/qt/common/template/template-qt5-vc11.vcxproj index afcc020..2af597c 100644 --- a/qt/common/template/template-qt5-vc11.vcxproj +++ b/qt/common/template/template-qt5-vc11.vcxproj @@ -162,7 +162,7 @@ __custom_build_entry__( test.hxx, odb test.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx, +odb.exe --std c++11 --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx, test-odb.hxx;test-odb.ixx;test-odb.cxx) diff --git a/qt/common/template/template-qt5-vc9.vcproj b/qt/common/template/template-qt5-vc9.vcproj index dab4913..57b4edc 100644 --- a/qt/common/template/template-qt5-vc9.vcproj +++ b/qt/common/template/template-qt5-vc9.vcproj @@ -348,7 +348,7 @@ __source_entries__(extra_sources) __file_entry_custom_build__( test.hxx, odb test.hxx, -odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\..\libcommon)) test.hxx, +odb.exe --database __value__(database) __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\..\libcommon)) test.hxx, test-odb.hxx;test-odb.ixx;test-odb.cxx) __file_entry__(test-odb.hxx) __file_entry__(test-odb.ixx) -- cgit v1.1