From 91f45e1948c2bfdd9083a0fd22c6ed6d49e7fed0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 13 Jun 2013 21:52:14 +0200 Subject: Handle --database option directly in automake and VC++ projects --- schema/custom/makefile | 7 ++++--- schema/embedded/makefile | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'schema') 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) -- cgit v1.1