summaryrefslogtreecommitdiff
path: root/examples/cxx/tree/custom/double
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cxx/tree/custom/double')
-rw-r--r--examples/cxx/tree/custom/double/makefile25
1 files changed, 23 insertions, 2 deletions
diff --git a/examples/cxx/tree/custom/double/makefile b/examples/cxx/tree/custom/double/makefile
index e8bec43..0e1ed1d 100644
--- a/examples/cxx/tree/custom/double/makefile
+++ b/examples/cxx/tree/custom/double/makefile
@@ -11,8 +11,10 @@ cxx := driver.cxx double-custom.cxx
obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
dep := $(obj:.o=.o.d)
-driver := $(out_base)/driver
-clean := $(out_base)/.clean
+driver := $(out_base)/driver
+dist := $(out_base)/.dist
+dist-win := $(out_base)/.dist-win
+clean := $(out_base)/.clean
# Import.
@@ -52,6 +54,24 @@ $(call include-dep,$(dep))
.PHONY: $(out_base)/
$(out_base)/: $(driver)
+# Dist.
+#
+dist-common := $(out_base)/.dist-common
+
+$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
+
+$(dist-common):
+ $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
+ $(call install-data,$(src_base)/order.xsd,$(dist_prefix)/$(path)/order.xsd)
+ $(call install-data,$(src_base)/double-custom.hxx,$(dist_prefix)/$(path)/double-custom.hxx)
+ $(call install-data,$(src_base)/double-custom.cxx,$(dist_prefix)/$(path)/double-custom.cxx)
+
+$(dist): $(dist-common)
+ $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
+
+$(dist-win): $(dist-common)
+ $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
+ $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt)
# Clean.
#
@@ -80,6 +100,7 @@ endif
$(call include,$(bld_root)/cxx/o-e.make)
$(call include,$(bld_root)/cxx/cxx-o.make)
$(call include,$(bld_root)/cxx/cxx-d.make)
+$(call include,$(bld_root)/install.make)
$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
# Dependencies.