aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to 'template')
-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
5 files changed, 7 insertions, 6 deletions
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)