aboutsummaryrefslogtreecommitdiff
path: root/mysql/types
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-09-06 14:26:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-09-06 14:26:25 +0200
commit921c4c14c2999a03b9e649b5c9adec73b5cae0de (patch)
treec3a0015286ded8b59f2f44fd7b22be2748e16098 /mysql/types
parent0f9123ae095d3da7f2fb55d95af49ec3aa0a9c17 (diff)
Add automake build support
Diffstat (limited to 'mysql/types')
-rw-r--r--mysql/types/makefile17
-rw-r--r--mysql/types/test.mk4
2 files changed, 19 insertions, 2 deletions
diff --git a/mysql/types/makefile b/mysql/types/makefile
index c7c8742..859ef29 100644
--- a/mysql/types/makefile
+++ b/mysql/types/makefile
@@ -14,6 +14,7 @@ common.l := $(out_root)/libcommon/common.l
common.l.cpp-options := $(out_root)/libcommon/common.l.cpp-options
driver := $(out_base)/driver
+dist := $(out_base)/.dist
test := $(out_base)/.test
clean := $(out_base)/.clean
@@ -40,8 +41,9 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen): odb_options += --database $(db_id) --generate-schema \
---generate-query --cxx-prologue '\\\#include "traits.hxx"'
+$(gen) $(dist): export odb_options += --database mysql --generate-schema \
+--generate-query --cxx-prologue '\#include "traits.hxx"'
+
$(gen): cpp_options := -I$(out_base)
$(gen): $(common.l.cpp-options)
@@ -51,6 +53,14 @@ $(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
#
$(out_base)/: $(driver)
+# Dist
+#
+$(dist): data_dist := $(cxx_tun) $(odb_hdr) traits.hxx test.std
+$(dist): export extra_headers := traits.hxx
+$(dist):
+ $(call dist-data,$(data_dist))
+ $(call meta-automake,$(src_root)/mysql/template/Makefile.am)
+
# Test.
#
$(test): $(driver) $(src_base)/test.std
@@ -79,6 +89,9 @@ endif
# How to.
#
+$(call include,$(bld_root)/dist.make)
+$(call include,$(bld_root)/meta/automake.make)
+
$(call include,$(odb_rules))
$(call include,$(bld_root)/cxx/cxx-d.make)
$(call include,$(bld_root)/cxx/cxx-o.make)
diff --git a/mysql/types/test.mk b/mysql/types/test.mk
new file mode 100644
index 0000000..693fc71
--- /dev/null
+++ b/mysql/types/test.mk
@@ -0,0 +1,4 @@
+v = '\#include "foo.hxx"'
+
+all:
+ echo $v