aboutsummaryrefslogtreecommitdiff
path: root/common/threads/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'common/threads/makefile')
-rw-r--r--common/threads/makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/common/threads/makefile b/common/threads/makefile
index af03a93..6a8c802 100644
--- a/common/threads/makefile
+++ b/common/threads/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
@@ -34,7 +35,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen): odb_options += --database $(db_id) --generate-schema --generate-query
+$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
+--generate-query
$(gen): cpp_options := -I$(out_base)
$(gen): $(common.l.cpp-options)
@@ -44,6 +46,14 @@ $(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
#
$(out_base)/: $(driver)
+# Dist
+#
+$(dist): data_dist := $(cxx_tun) $(odb_hdr) test.std
+$(dist): db_id := @database@
+$(dist):
+ $(call dist-data,$(data_dist))
+ $(call meta-automake,$(src_root)/common/template/Makefile.am)
+
# Test.
#
$(test): $(driver) $(src_base)/test.std
@@ -72,6 +82,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)