aboutsummaryrefslogtreecommitdiff
path: root/evolution/drop-table/makefile
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-06-21 10:39:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-06-21 10:39:59 +0200
commit6cd8b9f561b912f264ba4f723845935c40a3cb95 (patch)
tree5983e0af3d2ee621242ca6707a58c89b9914d8f0 /evolution/drop-table/makefile
parent236cd9bb1dd022e64d690c9b0080d1a15c5f61c7 (diff)
Add support for running tests in dynamic multi-database mode
Only possible in the development build system at this stage.
Diffstat (limited to 'evolution/drop-table/makefile')
-rw-r--r--evolution/drop-table/makefile34
1 files changed, 12 insertions, 22 deletions
diff --git a/evolution/drop-table/makefile b/evolution/drop-table/makefile
index ff6014f..99339d7 100644
--- a/evolution/drop-table/makefile
+++ b/evolution/drop-table/makefile
@@ -6,17 +6,22 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
cxx_tun := driver.cxx
odb_hdr := test1.hxx test2.hxx test3.hxx
-cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o))
+genf1 := test1-odb.hxx test1-odb.ixx test1-odb.cxx
+gen1 := $(addprefix $(out_base)/,$(genf1))
+genf2 := test2-odb.hxx test2-odb.ixx test2-odb.cxx
+gen2 := $(addprefix $(out_base)/,$(genf2))
+genf3 := test3-odb.hxx test3-odb.ixx test3-odb.cxx
+gen3 := $(addprefix $(out_base)/,$(genf3))
+genf := $(genf1) $(genf2) $(genf3)
+gen := $(gen1) $(gen2) $(gen3)
+gens := test1.sql test2.sql test3.sql test3-002-pre.sql test3-002-post.sql \
+test3-003-pre.sql test3-003-post.sql
+cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o))
cxx_od := $(cxx_obj:.o=.o.d)
common.l := $(out_root)/libcommon/common/common.l
common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
-driver := $(out_base)/driver
-dist := $(out_base)/.dist
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
# Import.
#
$(call import,\
@@ -29,20 +34,6 @@ $(driver): $(cxx_obj) $(common.l)
$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base)
$(cxx_obj) $(cxx_od): $(common.l.cpp-options)
-genf1 := test1-odb.hxx test1-odb.ixx test1-odb.cxx
-gen1 := $(addprefix $(out_base)/,$(genf1))
-
-genf2 := test2-odb.hxx test2-odb.ixx test2-odb.cxx
-gen2 := $(addprefix $(out_base)/,$(genf2))
-
-genf3 := test3-odb.hxx test3-odb.ixx test3-odb.cxx
-gen3 := $(addprefix $(out_base)/,$(genf3))
-
-genf := $(genf1) $(genf2) $(genf3)
-gen := $(gen1) $(gen2) $(gen3)
-gens := test1.sql test2.sql test3.sql test3-002-pre.sql test3-002-post.sql \
-test3-003-pre.sql test3-003-post.sql
-
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): odb_common_options = --generate-query \
@@ -75,7 +66,6 @@ $(out_base)/: $(driver)
#
name := $(subst /,-,$(subst $(src_root)/evolution/,,$(src_base)))
-
$(dist): sources := $(cxx_tun)
$(dist): headers := $(odb_hdr)
$(dist): export extra_headers := model.hxx
@@ -113,7 +103,7 @@ $(clean): \
$(driver).o.clean \
$(addsuffix .cxx.clean,$(cxx_obj)) \
$(addsuffix .cxx.clean,$(cxx_od)) \
- $(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean))
+ $(addsuffix .hxx.clean,$(filter %.cxx,$(gen)))
$(call message,,rm -f $(out_base)/model.xml) # Changelog.
$(call message,,rm -f $(out_base)/test3-*.sql) # Migration files.