aboutsummaryrefslogtreecommitdiff
path: root/examples/cxx/tree/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cxx/tree/makefile')
-rw-r--r--examples/cxx/tree/makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/examples/cxx/tree/makefile b/examples/cxx/tree/makefile
index 8b7a665..15bcfb2 100644
--- a/examples/cxx/tree/makefile
+++ b/examples/cxx/tree/makefile
@@ -20,6 +20,7 @@ build_examples += xpath
endif
default := $(out_base)/
+install := $(out_base)/.install
dist := $(out_base)/.dist
dist-win := $(out_base)/.dist-win
clean := $(out_base)/.clean
@@ -28,9 +29,12 @@ clean := $(out_base)/.clean
#
$(default): $(addprefix $(out_base)/,$(addsuffix /,$(build_examples)))
-# Dist.
+# Install & Dist.
#
-$(dist) $(dist-win): path := $(subst $(src_root)/,,$(src_base))
+$(install) $(dist) $(dist-win): path := $(subst $(src_root)/,,$(src_base))
+
+$(install): $(addprefix $(out_base)/,$(addsuffix /.install,$(all_examples)))
+ $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(all_examples)))
$(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
@@ -43,8 +47,9 @@ $(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(all_examples)))
#
$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(build_examples)))
+$(call include,$(bld_root)/install.make)
-ifneq ($(filter $(MAKECMDGOALS),dist dist-win),)
+ifneq ($(filter $(MAKECMDGOALS),dist dist-win install),)
$(foreach e,$(all_examples),$(call import,$(src_base)/$e/makefile))
else
$(foreach e,$(build_examples),$(call import,$(src_base)/$e/makefile))