aboutsummaryrefslogtreecommitdiff
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/makefile28
-rw-r--r--examples/cxx/parser/library/makefile34
-rw-r--r--examples/cxx/parser/makefile46
-rw-r--r--examples/cxx/parser/minimal/makefile32
-rw-r--r--examples/cxx/parser/mixed/makefile30
-rw-r--r--examples/cxx/parser/multiroot/makefile36
-rw-r--r--examples/cxx/parser/polymorphism/makefile32
-rw-r--r--examples/cxx/parser/polyroot/makefile34
-rw-r--r--examples/cxx/parser/wildcard/makefile28
10 files changed, 295 insertions, 30 deletions
diff --git a/examples/cxx/parser/generated/makefile b/examples/cxx/parser/generated/makefile
index 14c039c..3dc9c97 100644
--- a/examples/cxx/parser/generated/makefile
+++ b/examples/cxx/parser/generated/makefile
@@ -14,7 +14,9 @@ xsde.l := $(out_root)/libxsde/xsde/xsde.l
xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options
driver := $(out_base)/$(xsd:.xsd=-pdriver)
-clean := $(out_base)/.clean
+dist := $(out_base)/.dist
+dist-win := $(out_base)/.dist-win
+clean := $(out_base)/.clean
# Build.
@@ -42,6 +44,26 @@ $(call include-dep,$(dep))
$(out_base)/: $(driver)
+# Dist.
+#
+dist-common := $(out_base)/.dist-common
+
+.PHONY: $(dist) $(dist-win) $(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.
#
.PHONY: $(clean)
@@ -72,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)
xsd_pimpl_suffix := -pimpl
$(call include,$(scf_root)/xsde/parser/xsd-cxx.make)
diff --git a/examples/cxx/parser/hello/makefile b/examples/cxx/parser/hello/makefile
index 7f39cd3..b40fb0c 100644
--- a/examples/cxx/parser/hello/makefile
+++ b/examples/cxx/parser/hello/makefile
@@ -14,8 +14,10 @@ dep := $(obj:.o=.o.d)
xsde.l := $(out_root)/libxsde/xsde/xsde.l
xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options
-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
# Build.
@@ -39,6 +41,27 @@ $(call include-dep,$(dep))
$(out_base)/: $(driver)
+# Dist.
+#
+dist-common := $(out_base)/.dist-common
+
+.PHONY: $(dist) $(dist-win) $(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.
#
.PHONY: $(clean)
@@ -67,6 +90,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)/xsde/parser/xsd-cxx.make)
diff --git a/examples/cxx/parser/library/makefile b/examples/cxx/parser/library/makefile
index 6cf3f2b..e093cf8 100644
--- a/examples/cxx/parser/library/makefile
+++ b/examples/cxx/parser/library/makefile
@@ -20,8 +20,10 @@ dep := $(obj:.o=.o.d)
xsde.l := $(out_root)/libxsde/xsde/xsde.l
xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options
-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
# Build.
@@ -47,6 +49,33 @@ $(call include-dep,$(dep))
$(out_base)/: $(driver)
+# Dist.
+#
+dist-common := $(out_base)/.dist-common
+
+.PHONY: $(dist) $(dist-win) $(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.hxx,$(dist_prefix)/$(path)/library.hxx)
+ $(call install-data,$(src_base)/library-pimpl-mixin.hxx,$(dist_prefix)/$(path)/library-pimpl-mixin.hxx)
+ $(call install-data,$(src_base)/library-pimpl-mixin.cxx,$(dist_prefix)/$(path)/library-pimpl-mixin.cxx)
+ $(call install-data,$(src_base)/library-pimpl-tiein.hxx,$(dist_prefix)/$(path)/library-pimpl-tiein.hxx)
+ $(call install-data,$(src_base)/library-pimpl-tiein.cxx,$(dist_prefix)/$(path)/library-pimpl-tiein.cxx)
+ $(call install-data,$(src_base)/library.map,$(dist_prefix)/$(path)/library.map)
+ $(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.
#
.PHONY: $(clean)
@@ -75,6 +104,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)/xsde/parser/xsd-cxx.make)
diff --git a/examples/cxx/parser/makefile b/examples/cxx/parser/makefile
index 5a81a72..92e00ce 100644
--- a/examples/cxx/parser/makefile
+++ b/examples/cxx/parser/makefile
@@ -5,29 +5,32 @@
include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make
-examples :=
+all_examples := generated hello library multiroot polymorphism polyroot \
+mixed wildcard minimal
+
+build_examples :=
ifneq ($(xsde_reuse_style),none)
-examples += generated
+build_examples += generated
endif
ifeq ($(xsde_stl),y)
ifeq ($(xsde_iostream),y)
ifeq ($(xsde_exceptions),y)
-examples += hello
+build_examples += hello
ifneq ($(xsde_reuse_style),none)
-examples += library multiroot
+build_examples += library multiroot
ifeq ($(xsde_polymorphic),y)
-examples += polymorphism polyroot
+build_examples += polymorphism polyroot
endif
endif
ifeq ($(xsde_reuse_style),tiein)
-examples += mixed wildcard
+build_examples += mixed wildcard
endif
endif
@@ -37,17 +40,34 @@ endif
ifeq ($(xsde_stl),n)
ifeq ($(xsde_exceptions),n)
ifneq ($(xsde_reuse_style),none)
-examples += minimal
+build_examples += minimal
endif
endif
endif
-default := $(out_base)/
-clean := $(out_base)/.clean
+default := $(out_base)/
+dist := $(out_base)/.dist
+dist-win := $(out_base)/.dist-win
+clean := $(out_base)/.clean
+
+.PHONY: $(default) $(dist) $(dist-win) $(clean)
+
+$(default): $(addprefix $(out_base)/,$(addsuffix /,$(build_examples)))
+$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(build_examples)))
-.PHONY: $(default) $(clean)
+# Dist.
+#
+$(dist) $(dist-win): path := $(subst $(src_root)/,,$(src_base))
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(examples)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(examples)))
+$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(all_examples)))
+ $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-$(foreach e,$(examples),$(call import,$(src_base)/$e/makefile))
+$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(all_examples)))
+ $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
+ $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt)
+
+ifneq ($(filter $(MAKECMDGOALS),dist dist-win),)
+$(foreach e,$(all_examples),$(call import,$(src_base)/$e/makefile))
+else
+$(foreach e,$(build_examples),$(call import,$(src_base)/$e/makefile))
+endif
diff --git a/examples/cxx/parser/minimal/makefile b/examples/cxx/parser/minimal/makefile
index 7a1eb8f..c0dfda1 100644
--- a/examples/cxx/parser/minimal/makefile
+++ b/examples/cxx/parser/minimal/makefile
@@ -14,8 +14,10 @@ dep := $(obj:.o=.o.d)
xsde.l := $(out_root)/libxsde/xsde/xsde.l
xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options
-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
# Build.
@@ -41,6 +43,31 @@ $(call include-dep,$(dep))
$(out_base)/: $(driver)
+# Dist.
+#
+dist-common := $(out_base)/.dist-common
+
+.PHONY: $(dist) $(dist-win) $(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)/gender.hxx,$(dist_prefix)/$(path)/gender.hxx)
+ $(call install-data,$(src_base)/people-pimpl-mixin.hxx,$(dist_prefix)/$(path)/people-pimpl-mixin.hxx)
+ $(call install-data,$(src_base)/people-pimpl-tiein.hxx,$(dist_prefix)/$(path)/people-pimpl-tiein.hxx)
+ $(call install-data,$(src_base)/people.map,$(dist_prefix)/$(path)/people.map)
+ $(call install-data,$(src_base)/people.xsd,$(dist_prefix)/$(path)/people.xsd)
+ $(call install-data,$(src_base)/people.xml,$(dist_prefix)/$(path)/people.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.
#
.PHONY: $(clean)
@@ -69,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)
$(call include,$(scf_root)/xsde/parser/xsd-cxx.make)
diff --git a/examples/cxx/parser/mixed/makefile b/examples/cxx/parser/mixed/makefile
index 5fa42f1..52072ab 100644
--- a/examples/cxx/parser/mixed/makefile
+++ b/examples/cxx/parser/mixed/makefile
@@ -14,8 +14,10 @@ dep := $(obj:.o=.o.d)
xsde.l := $(out_root)/libxsde/xsde/xsde.l
xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options
-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
# Build.
@@ -41,6 +43,29 @@ $(call include-dep,$(dep))
$(out_base)/: $(driver)
+# Dist.
+#
+dist-common := $(out_base)/.dist-common
+
+.PHONY: $(dist) $(dist-win) $(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)/anchor.hxx,$(dist_prefix)/$(path)/anchor.hxx)
+ $(call install-data,$(src_base)/text.map,$(dist_prefix)/$(path)/text.map)
+ $(call install-data,$(src_base)/text.xsd,$(dist_prefix)/$(path)/text.xsd)
+ $(call install-data,$(src_base)/text.xml,$(dist_prefix)/$(path)/text.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.
#
.PHONY: $(clean)
@@ -69,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)/xsde/parser/xsd-cxx.make)
diff --git a/examples/cxx/parser/multiroot/makefile b/examples/cxx/parser/multiroot/makefile
index 92c53b6..f3f2e7a 100644
--- a/examples/cxx/parser/multiroot/makefile
+++ b/examples/cxx/parser/multiroot/makefile
@@ -20,8 +20,10 @@ dep := $(obj:.o=.o.d)
xsde.l := $(out_root)/libxsde/xsde/xsde.l
xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options
-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
# Build.
@@ -46,6 +48,35 @@ $(call include-dep,$(dep))
$(out_base)/: $(driver)
+# Dist.
+#
+dist-common := $(out_base)/.dist-common
+
+.PHONY: $(dist) $(dist-win) $(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.hxx,$(dist_prefix)/$(path)/protocol.hxx)
+ $(call install-data,$(src_base)/protocol-pimpl-mixin.hxx,$(dist_prefix)/$(path)/protocol-pimpl-mixin.hxx)
+ $(call install-data,$(src_base)/protocol-pimpl-mixin.cxx,$(dist_prefix)/$(path)/protocol-pimpl-mixin.cxx)
+ $(call install-data,$(src_base)/protocol-pimpl-tiein.hxx,$(dist_prefix)/$(path)/protocol-pimpl-tiein.hxx)
+ $(call install-data,$(src_base)/protocol-pimpl-tiein.cxx,$(dist_prefix)/$(path)/protocol-pimpl-tiein.cxx)
+ $(call install-data,$(src_base)/protocol.map,$(dist_prefix)/$(path)/protocol.map)
+ $(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)
+
+$(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.
#
.PHONY: $(clean)
@@ -74,6 +105,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)/xsde/parser/xsd-cxx.make)
diff --git a/examples/cxx/parser/polymorphism/makefile b/examples/cxx/parser/polymorphism/makefile
index a8f5167..764d69d 100644
--- a/examples/cxx/parser/polymorphism/makefile
+++ b/examples/cxx/parser/polymorphism/makefile
@@ -20,8 +20,10 @@ dep := $(obj:.o=.o.d)
xsde.l := $(out_root)/libxsde/xsde/xsde.l
xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options
-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
# Build.
@@ -46,6 +48,31 @@ $(call include-dep,$(dep))
$(out_base)/: $(driver)
+# Dist.
+#
+dist-common := $(out_base)/.dist-common
+
+.PHONY: $(dist) $(dist-win) $(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-pimpl-mixin.hxx,$(dist_prefix)/$(path)/supermen-pimpl-mixin.hxx)
+ $(call install-data,$(src_base)/supermen-pimpl-mixin.cxx,$(dist_prefix)/$(path)/supermen-pimpl-mixin.cxx)
+ $(call install-data,$(src_base)/supermen-pimpl-tiein.hxx,$(dist_prefix)/$(path)/supermen-pimpl-tiein.hxx)
+ $(call install-data,$(src_base)/supermen-pimpl-tiein.cxx,$(dist_prefix)/$(path)/supermen-pimpl-tiein.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)
+
+$(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.
#
.PHONY: $(clean)
@@ -74,6 +101,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)/xsde/parser/xsd-cxx.make)
diff --git a/examples/cxx/parser/polyroot/makefile b/examples/cxx/parser/polyroot/makefile
index 2a72c3a..7de4341 100644
--- a/examples/cxx/parser/polyroot/makefile
+++ b/examples/cxx/parser/polyroot/makefile
@@ -20,8 +20,10 @@ dep := $(obj:.o=.o.d)
xsde.l := $(out_root)/libxsde/xsde/xsde.l
xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options
-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
# Build.
@@ -46,6 +48,33 @@ $(call include-dep,$(dep))
$(out_base)/: $(driver)
+# Dist.
+#
+dist-common := $(out_base)/.dist-common
+
+.PHONY: $(dist) $(dist-win) $(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-pimpl-mixin.hxx,$(dist_prefix)/$(path)/supermen-pimpl-mixin.hxx)
+ $(call install-data,$(src_base)/supermen-pimpl-mixin.cxx,$(dist_prefix)/$(path)/supermen-pimpl-mixin.cxx)
+ $(call install-data,$(src_base)/supermen-pimpl-tiein.hxx,$(dist_prefix)/$(path)/supermen-pimpl-tiein.hxx)
+ $(call install-data,$(src_base)/supermen-pimpl-tiein.cxx,$(dist_prefix)/$(path)/supermen-pimpl-tiein.cxx)
+ $(call install-data,$(src_base)/supermen.xsd,$(dist_prefix)/$(path)/supermen.xsd)
+ $(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)/batman.xml,$(dist_prefix)/$(path)/batman.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.
#
.PHONY: $(clean)
@@ -74,6 +103,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)/xsde/parser/xsd-cxx.make)
diff --git a/examples/cxx/parser/wildcard/makefile b/examples/cxx/parser/wildcard/makefile
index c07b11b..166c403 100644
--- a/examples/cxx/parser/wildcard/makefile
+++ b/examples/cxx/parser/wildcard/makefile
@@ -14,8 +14,10 @@ dep := $(obj:.o=.o.d)
xsde.l := $(out_root)/libxsde/xsde/xsde.l
xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options
-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
# Build.
@@ -39,6 +41,27 @@ $(call include-dep,$(dep))
$(out_base)/: $(driver)
+# Dist.
+#
+dist-common := $(out_base)/.dist-common
+
+.PHONY: $(dist) $(dist-win) $(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.
#
.PHONY: $(clean)
@@ -67,6 +90,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)/xsde/parser/xsd-cxx.make)