From f8a67ebd9b33fd0f8d69405d4d1895541f3d3a1f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 29 Apr 2012 21:01:50 +0200 Subject: Add support for building various configurations --- git/makefile | 18 ++++++++++++++++-- 1 file 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 - build tests and examples for # make -test - build and run tests and examples for # +# 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 -- cgit v1.1