summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
Diffstat (limited to 'git')
-rw-r--r--git/makefile18
1 files changed, 16 insertions, 2 deletions
diff --git a/git/makefile b/git/makefile
index 28dbaf5..c6d5aeb 100644
--- a/git/makefile
+++ b/git/makefile
@@ -1,12 +1,23 @@
# Root makefile that can be used to build/run tests and examples for some
# or all databases:
+#
# make - build tests and examples for all the databases
# make test - build and run tests and examples for all the databases
# make <db> - build tests and examples for <db>
# make <db>-test - build and run tests and examples for <db>
#
+# Additional command line variables:
+#
+# conf - configuration to build
+#
db := mssql oracle pgsql sqlite mysql
+ifeq ($(conf),)
+conf_suffix := default
+else
+conf_suffix := builds/$(conf)
+endif
+
.PHONY: all test clean $(db) $(addsuffix -test,$(db)) $(addsuffix -clean,$(db))
all: $(db)
@@ -14,9 +25,10 @@ test: $(addsuffix -test,$(db))
clean: $(addsuffix -clean,$(db))
define set_dirs
-edir := $$(wildcard examples-$1-default)
-tdir := $$(wildcard tests-$1-default)
+edir := $$(wildcard examples-$1-$(conf_suffix))
+tdir := $$(wildcard tests-$1-$(conf_suffix))
+ifeq ($(conf),)
ifeq ($$(edir),)
edir := examples-$1
endif
@@ -24,6 +36,8 @@ endif
ifeq ($$(tdir),)
tdir := tests-$1
endif
+endif
+
endef
define build_rule