From 3c853bc264719437bcb2807d75ff5e9f9a3ea4f8 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 22 Sep 2009 14:40:53 +0200 Subject: Add distribution-specific files, dist and dist-win targets --- examples/cxx/tree/custom/taxonomy/makefile | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'examples/cxx/tree/custom/taxonomy/makefile') diff --git a/examples/cxx/tree/custom/taxonomy/makefile b/examples/cxx/tree/custom/taxonomy/makefile index 02ea144..26e27cf 100644 --- a/examples/cxx/tree/custom/taxonomy/makefile +++ b/examples/cxx/tree/custom/taxonomy/makefile @@ -11,8 +11,10 @@ cxx := driver.cxx people-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. @@ -56,6 +58,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)/people.xsd,$(dist_prefix)/$(path)/people.xsd) + $(call install-data,$(src_base)/people.xml,$(dist_prefix)/$(path)/people.xml) + $(call install-data,$(src_base)/people-custom.hxx,$(dist_prefix)/$(path)/people-custom.hxx) + $(call install-data,$(src_base)/people-custom.cxx,$(dist_prefix)/$(path)/people-custom.cxx) + $(call install-data,$(src_base)/people-custom-fwd.hxx,$(dist_prefix)/$(path)/people-custom-fwd.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. # @@ -83,6 +106,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. -- cgit v1.1