aboutsummaryrefslogtreecommitdiff
path: root/examples/cxx/parser/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cxx/parser/makefile')
-rw-r--r--examples/cxx/parser/makefile24
1 files changed, 20 insertions, 4 deletions
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))