From d3e68edc2b5e37ed3b585dde1f36066e5c3c02e6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 27 Mar 2011 14:29:03 +0200 Subject: Don't run fake db driver for SQLite By default embedded schema is used. --- boost/makefile | 4 ++-- build/bootstrap.make | 8 ++++++++ build/sqlite/configure | 5 ----- composite/makefile | 4 ++-- container/makefile | 4 ++-- hello/makefile | 4 ++-- inverse/makefile | 4 ++-- mapping/makefile | 4 ++-- query/makefile | 4 ++-- relationship/makefile | 4 ++-- template/makefile | 4 ++-- 11 files changed, 26 insertions(+), 23 deletions(-) diff --git a/boost/makefile b/boost/makefile index 5ef7eac..8ea4996 100644 --- a/boost/makefile +++ b/boost/makefile @@ -91,9 +91,9 @@ $(dist): # Test. # -$(test): schema := $(out_base)/$(basename $(odb_hdr)).sql +$(test): header := $(odb_hdr) $(test): $(driver) - $(call message,sql $$1,$(dcf_root)/db-driver $$1,$(schema)) + $(call schema) $(call message,test $<,$< --options-file $(dcf_root)/db.options) # Clean. diff --git a/build/bootstrap.make b/build/bootstrap.make index c6039eb..f2f8699 100644 --- a/build/bootstrap.make +++ b/build/bootstrap.make @@ -45,6 +45,14 @@ clean: $(out_base)/.clean endif +# Database schema creation. +# +ifeq ($(filter $(db_id),sqlite),) +$(out_base)/.test: schema = \ +$(call message,sql $$1,\ +$(dcf_root)/db-driver $$1,$(out_base)/$(basename $(header)).sql) +endif + # Dist setup. # ifneq ($(filter $(MAKECMDGOALS),dist),) diff --git a/build/sqlite/configure b/build/sqlite/configure index 64b4f1b..621d582 100755 --- a/build/sqlite/configure +++ b/build/sqlite/configure @@ -19,10 +19,5 @@ $echo db=`read_value` opt=$dcf_root/db.options -drv=$dcf_root/db-driver echo "--database '$db'" >$opt - -echo "#!/bin/sh" >$drv -echo "# dummy" >>$drv -chmod 755 $drv diff --git a/composite/makefile b/composite/makefile index 185f1f9..ef87313 100644 --- a/composite/makefile +++ b/composite/makefile @@ -76,9 +76,9 @@ $(dist): # Test. # -$(test): schema := $(out_base)/$(basename $(odb_hdr)).sql +$(test): header := $(odb_hdr) $(test): $(driver) - $(call message,sql $$1,$(dcf_root)/db-driver $$1,$(schema)) + $(call schema) $(call message,test $<,$< --options-file $(dcf_root)/db.options) # Clean. diff --git a/container/makefile b/container/makefile index 800a68d..e892bcf 100644 --- a/container/makefile +++ b/container/makefile @@ -75,9 +75,9 @@ $(dist): # Test. # -$(test): schema := $(out_base)/$(basename $(odb_hdr)).sql +$(test): header := $(odb_hdr) $(test): $(driver) - $(call message,sql $$1,$(dcf_root)/db-driver $$1,$(schema)) + $(call schema) $(call message,test $<,$< --options-file $(dcf_root)/db.options) # Clean. diff --git a/hello/makefile b/hello/makefile index e1a2471..ea93bfb 100644 --- a/hello/makefile +++ b/hello/makefile @@ -76,9 +76,9 @@ $(dist): # Test. # -$(test): schema := $(out_base)/$(basename $(odb_hdr)).sql +$(test): header := $(odb_hdr) $(test): $(driver) - $(call message,sql $$1,$(dcf_root)/db-driver $$1,$(schema)) + $(call schema) $(call message,test $<,$< --options-file $(dcf_root)/db.options) # Clean. diff --git a/inverse/makefile b/inverse/makefile index 1b56e64..76e967c 100644 --- a/inverse/makefile +++ b/inverse/makefile @@ -76,9 +76,9 @@ $(dist): # Test. # -$(test): schema := $(out_base)/$(basename $(odb_hdr)).sql +$(test): header := $(odb_hdr) $(test): $(driver) - $(call message,sql $$1,$(dcf_root)/db-driver $$1,$(schema)) + $(call schema) $(call message,test $<,$< --options-file $(dcf_root)/db.options) # Clean. diff --git a/mapping/makefile b/mapping/makefile index 273e0ab..8e7ff14 100644 --- a/mapping/makefile +++ b/mapping/makefile @@ -78,9 +78,9 @@ README database.hxx) # Test. # -$(test): schema := $(out_base)/$(basename $(odb_hdr)).sql +$(test): header := $(odb_hdr) $(test): $(driver) - $(call message,sql $$1,$(dcf_root)/db-driver $$1,$(schema)) + $(call schema) $(call message,test $<,$< --options-file $(dcf_root)/db.options) # Clean. diff --git a/query/makefile b/query/makefile index a332378..8e4a0dd 100644 --- a/query/makefile +++ b/query/makefile @@ -76,9 +76,9 @@ $(dist): # Test. # -$(test): schema := $(out_base)/$(basename $(odb_hdr)).sql +$(test): header := $(odb_hdr) $(test): $(driver) - $(call message,sql $$1,$(dcf_root)/db-driver $$1,$(schema)) + $(call schema) $(call message,test $<,$< --options-file $(dcf_root)/db.options) # Clean. diff --git a/relationship/makefile b/relationship/makefile index e8d3d1a..5b4eb6d 100644 --- a/relationship/makefile +++ b/relationship/makefile @@ -76,9 +76,9 @@ $(dist): # Test. # -$(test): schema := $(out_base)/$(basename $(odb_hdr)).sql +$(test): header := $(odb_hdr) $(test): $(driver) - $(call message,sql $$1,$(dcf_root)/db-driver $$1,$(schema)) + $(call schema) $(call message,test $<,$< --options-file $(dcf_root)/db.options) # Clean. diff --git a/template/makefile b/template/makefile index 2675389..17face5 100644 --- a/template/makefile +++ b/template/makefile @@ -75,9 +75,9 @@ $(dist): # Test. # -$(test): schema := $(out_base)/$(basename $(odb_hdr)).sql +$(test): header := $(odb_hdr) $(test): $(driver) - $(call message,sql $$1,$(dcf_root)/db-driver $$1,$(schema)) + $(call schema) $(call message,test $<,$< --options-file $(dcf_root)/db.options) # Clean. -- cgit v1.1