summaryrefslogtreecommitdiff
path: root/examples/cxx/parser
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cxx/parser')
-rw-r--r--examples/cxx/parser/generated/makefile25
-rw-r--r--examples/cxx/parser/hello/makefile24
-rw-r--r--examples/cxx/parser/library/makefile28
-rw-r--r--examples/cxx/parser/makefile24
-rw-r--r--examples/cxx/parser/mixed/makefile27
-rw-r--r--examples/cxx/parser/mixin/makefile27
-rw-r--r--examples/cxx/parser/multiroot/makefile31
-rw-r--r--examples/cxx/parser/performance/makefile30
-rw-r--r--examples/cxx/parser/polymorphism/makefile26
-rw-r--r--examples/cxx/parser/polyroot/makefile29
-rw-r--r--examples/cxx/parser/wildcard/makefile25
11 files changed, 271 insertions, 25 deletions
diff --git a/examples/cxx/parser/generated/makefile b/examples/cxx/parser/generated/makefile
index 031e59e..2c8d571 100644
--- a/examples/cxx/parser/generated/makefile
+++ b/examples/cxx/parser/generated/makefile
@@ -10,8 +10,11 @@ xsd := library.xsd
obj := $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.o) $(xsd:.xsd=-pimpl.o) $(xsd:.xsd=-driver.o))
dep := $(obj:.o=.o.d)
-driver := $(out_base)/$(xsd:.xsd=-driver)
-clean := $(out_base)/.clean
+
+driver := $(out_base)/$(xsd:.xsd=-driver)
+dist := $(out_base)/.dist
+dist-win := $(out_base)/.dist-win
+clean := $(out_base)/.clean
# Import.
#
@@ -48,6 +51,23 @@ $(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)/library.xsd,$(dist_prefix)/$(path)/library.xsd)
+ $(call install-data,$(src_base)/library.xml,$(dist_prefix)/$(path)/library.xml)
+
+$(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.
#
@@ -76,6 +96,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)
xsd_parser_impl_suffix := -pimpl
$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
diff --git a/examples/cxx/parser/hello/makefile b/examples/cxx/parser/hello/makefile
index 48f39d2..2ead3fa 100644
--- a/examples/cxx/parser/hello/makefile
+++ b/examples/cxx/parser/hello/makefile
@@ -11,8 +11,10 @@ cxx := driver.cxx
obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.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.
@@ -42,6 +44,23 @@ $(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)/hello.xsd,$(dist_prefix)/$(path)/hello.xsd)
+ $(call install-data,$(src_base)/hello.xml,$(dist_prefix)/$(path)/hello.xml)
+
+$(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.
#
@@ -69,6 +88,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/parser/xsd-cxx.make)
diff --git a/examples/cxx/parser/library/makefile b/examples/cxx/parser/library/makefile
index 0d88942..bc4ab73 100644
--- a/examples/cxx/parser/library/makefile
+++ b/examples/cxx/parser/library/makefile
@@ -11,8 +11,10 @@ cxx := driver.cxx library-pimpl.cxx
obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.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.
@@ -43,6 +45,27 @@ $(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)/library.xsd,$(dist_prefix)/$(path)/library.xsd)
+ $(call install-data,$(src_base)/library.xml,$(dist_prefix)/$(path)/library.xml)
+ $(call install-data,$(src_base)/library.map,$(dist_prefix)/$(path)/library.map)
+ $(call install-data,$(src_base)/library.hxx,$(dist_prefix)/$(path)/library.hxx)
+ $(call install-data,$(src_base)/library-pimpl.hxx,$(dist_prefix)/$(path)/library-pimpl.hxx)
+ $(call install-data,$(src_base)/library-pimpl.cxx,$(dist_prefix)/$(path)/library-pimpl.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.
#
@@ -70,6 +93,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/parser/xsd-cxx.make)
diff --git a/examples/cxx/parser/makefile b/examples/cxx/parser/makefile
index 25d9c54..9f3e27d 100644
--- a/examples/cxx/parser/makefile
+++ b/examples/cxx/parser/makefile
@@ -8,12 +8,28 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make
examples := generated hello library mixin mixed multiroot performance \
polymorphism polyroot wildcard
-default := $(out_base)/
-clean := $(out_base)/.clean
-
-.PHONY: $(default) $(clean)
+default := $(out_base)/
+dist := $(out_base)/.dist
+dist-win := $(out_base)/.dist-win
+clean := $(out_base)/.clean
+# Build
+#
$(default): $(addprefix $(out_base)/,$(addsuffix /,$(examples)))
+
+# Dist
+#
+$(dist) $(dist-win): path := $(subst $(src_root)/,,$(src_base))
+
+$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(examples)))
+ $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
+
+$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(examples)))
+ $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
+ $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt)
+
+# Clean
+#
$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(examples)))
$(foreach e,$(examples),$(call import,$(src_base)/$e/makefile))
diff --git a/examples/cxx/parser/mixed/makefile b/examples/cxx/parser/mixed/makefile
index 5da80ee..4d1fb0c 100644
--- a/examples/cxx/parser/mixed/makefile
+++ b/examples/cxx/parser/mixed/makefile
@@ -11,8 +11,10 @@ cxx := driver.cxx
obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.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.
@@ -43,6 +45,26 @@ $(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)/text.xsd,$(dist_prefix)/$(path)/text.xsd)
+ $(call install-data,$(src_base)/text.xml,$(dist_prefix)/$(path)/text.xml)
+ $(call install-data,$(src_base)/text.map,$(dist_prefix)/$(path)/text.map)
+ $(call install-data,$(src_base)/anchor.hxx,$(dist_prefix)/$(path)/anchor.hxx)
+
+$(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.
#
@@ -70,6 +92,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/parser/xsd-cxx.make)
diff --git a/examples/cxx/parser/mixin/makefile b/examples/cxx/parser/mixin/makefile
index 104db00..bb3927c 100644
--- a/examples/cxx/parser/mixin/makefile
+++ b/examples/cxx/parser/mixin/makefile
@@ -11,8 +11,10 @@ cxx := driver.cxx
obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.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.
@@ -43,6 +45,26 @@ $(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)/schema.xsd,$(dist_prefix)/$(path)/schema.xsd)
+ $(call install-data,$(src_base)/instance.xml,$(dist_prefix)/$(path)/instance.xml)
+ $(call install-data,$(src_base)/schema.map,$(dist_prefix)/$(path)/schema.map)
+ $(call install-data,$(src_base)/types.hxx,$(dist_prefix)/$(path)/types.hxx)
+
+$(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.
#
@@ -70,6 +92,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/parser/xsd-cxx.make)
diff --git a/examples/cxx/parser/multiroot/makefile b/examples/cxx/parser/multiroot/makefile
index 988ecbf..02b9f57 100644
--- a/examples/cxx/parser/multiroot/makefile
+++ b/examples/cxx/parser/multiroot/makefile
@@ -11,8 +11,10 @@ cxx := driver.cxx protocol-pimpl.cxx
obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.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.
@@ -43,6 +45,29 @@ $(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)/protocol.xsd,$(dist_prefix)/$(path)/protocol.xsd)
+ $(call install-data,$(src_base)/balance.xml,$(dist_prefix)/$(path)/balance.xml)
+ $(call install-data,$(src_base)/deposit.xml,$(dist_prefix)/$(path)/deposit.xml)
+ $(call install-data,$(src_base)/withdraw.xml,$(dist_prefix)/$(path)/withdraw.xml)
+ $(call install-data,$(src_base)/protocol.map,$(dist_prefix)/$(path)/protocol.map)
+ $(call install-data,$(src_base)/protocol.hxx,$(dist_prefix)/$(path)/protocol.hxx)
+ $(call install-data,$(src_base)/protocol-pimpl.hxx,$(dist_prefix)/$(path)/protocol-pimpl.hxx)
+ $(call install-data,$(src_base)/protocol-pimpl.cxx,$(dist_prefix)/$(path)/protocol-pimpl.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.
#
@@ -70,9 +95,9 @@ 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/parser/xsd-cxx.make)
-
# Dependencies.
#
$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/parser/performance/makefile b/examples/cxx/parser/performance/makefile
index 80e0e60..15938c9 100644
--- a/examples/cxx/parser/performance/makefile
+++ b/examples/cxx/parser/performance/makefile
@@ -11,8 +11,10 @@ cxx := driver.cxx time.cxx
obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.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.
@@ -43,6 +45,29 @@ $(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)/test.xsd,$(dist_prefix)/$(path)/test.xsd)
+ $(call install-data,$(src_base)/test-5k.xml,$(dist_prefix)/$(path)/test-5k.xml)
+ $(call install-data,$(src_base)/test-50k.xml,$(dist_prefix)/$(path)/test-50k.xml)
+ $(call install-data,$(src_base)/test-500k.xml,$(dist_prefix)/$(path)/test-500k.xml)
+ $(call install-data,$(src_base)/time.hxx,$(dist_prefix)/$(path)/time.hxx)
+ $(call install-data,$(src_base)/time.cxx,$(dist_prefix)/$(path)/time.cxx)
+ $(call install-data,$(src_base)/gen.cxx,$(dist_prefix)/$(path)/gen.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.
#
@@ -70,6 +95,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/parser/xsd-cxx.make)
diff --git a/examples/cxx/parser/polymorphism/makefile b/examples/cxx/parser/polymorphism/makefile
index f53700b..954518b 100644
--- a/examples/cxx/parser/polymorphism/makefile
+++ b/examples/cxx/parser/polymorphism/makefile
@@ -11,8 +11,10 @@ cxx := driver.cxx supermen-pimpl.cxx
obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.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.
@@ -43,6 +45,25 @@ $(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)/supermen.xsd,$(dist_prefix)/$(path)/supermen.xsd)
+ $(call install-data,$(src_base)/supermen.xml,$(dist_prefix)/$(path)/supermen.xml)
+ $(call install-data,$(src_base)/supermen-pimpl.hxx,$(dist_prefix)/$(path)/supermen-pimpl.hxx)
+ $(call install-data,$(src_base)/supermen-pimpl.cxx,$(dist_prefix)/$(path)/supermen-pimpl.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.
#
@@ -70,6 +91,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/parser/xsd-cxx.make)
diff --git a/examples/cxx/parser/polyroot/makefile b/examples/cxx/parser/polyroot/makefile
index a62465d..007e1b9 100644
--- a/examples/cxx/parser/polyroot/makefile
+++ b/examples/cxx/parser/polyroot/makefile
@@ -11,8 +11,10 @@ cxx := driver.cxx supermen-pimpl.cxx
obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.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.
@@ -43,6 +45,28 @@ $(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)/supermen.xsd,$(dist_prefix)/$(path)/supermen.xsd)
+ $(call install-data,$(src_base)/batman.xml,$(dist_prefix)/$(path)/batman.xml)
+ $(call install-data,$(src_base)/person.xml,$(dist_prefix)/$(path)/person.xml)
+ $(call install-data,$(src_base)/superman.xml,$(dist_prefix)/$(path)/superman.xml)
+ $(call install-data,$(src_base)/supermen-pimpl.hxx,$(dist_prefix)/$(path)/supermen-pimpl.hxx)
+ $(call install-data,$(src_base)/supermen-pimpl.cxx,$(dist_prefix)/$(path)/supermen-pimpl.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.
#
@@ -70,6 +94,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/parser/xsd-cxx.make)
diff --git a/examples/cxx/parser/wildcard/makefile b/examples/cxx/parser/wildcard/makefile
index 7345926..8587bfc 100644
--- a/examples/cxx/parser/wildcard/makefile
+++ b/examples/cxx/parser/wildcard/makefile
@@ -11,8 +11,10 @@ cxx := driver.cxx
obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.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.
@@ -42,6 +44,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)/email.xsd,$(dist_prefix)/$(path)/email.xsd)
+ $(call install-data,$(src_base)/email.xml,$(dist_prefix)/$(path)/email.xml)
+
+$(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.
#
@@ -69,6 +89,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/parser/xsd-cxx.make)