diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2009-09-22 14:40:53 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2009-09-22 14:40:53 +0200 |
commit | 3c853bc264719437bcb2807d75ff5e9f9a3ea4f8 (patch) | |
tree | e9405b1078b0ed8a7be6c296d1a50653c1785b89 /examples/cxx/tree/makefile | |
parent | 8564df32f304589dfdffe46140a75f6e5d44523c (diff) |
Add distribution-specific files, dist and dist-win targets
Diffstat (limited to 'examples/cxx/tree/makefile')
-rw-r--r-- | examples/cxx/tree/makefile | 44 |
1 files changed, 34 insertions, 10 deletions
diff --git a/examples/cxx/tree/makefile b/examples/cxx/tree/makefile index 7866b33..8b7a665 100644 --- a/examples/cxx/tree/makefile +++ b/examples/cxx/tree/makefile @@ -5,23 +5,47 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make -examples := binary caching custom hello library messaging mixed multiroot \ -performance polymorphism streaming wildcard +all_examples := binary caching custom hello library messaging mixed \ +multiroot performance polymorphism streaming wildcard dbxml xpath + +build_examples := binary caching custom hello library messaging mixed \ +multiroot performance polymorphism streaming wildcard ifeq ($(xsd_with_dbxml),y) -examples += dbxml +build_examples += dbxml endif ifeq ($(xsd_with_xqilla),y) -examples += xpath +build_examples += xpath 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 + +# Build. +# +$(default): $(addprefix $(out_base)/,$(addsuffix /,$(build_examples))) + +# Dist. +# +$(dist) $(dist-win): path := $(subst $(src_root)/,,$(src_base)) -.PHONY: $(default) $(clean) +$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(all_examples))) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) -$(default): $(addprefix $(out_base)/,$(addsuffix /,$(examples))) -$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(examples))) +$(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) -$(foreach e,$(examples),$(call import,$(src_base)/$e/makefile)) +# Clean. +# +$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(build_examples))) + + +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 |