From 6c63b913179127e09ed7d9da8920493ccceec6ce Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 2 Mar 2009 12:14:54 +0200 Subject: Add make support for creating binary distributions Two new make targets, dist and dist-win, were added that allow one to create a binary distribution from the current build. The dist target creates a UNIX distribution while dist-win -- Windows. The simplified build systems for the runtime library and examples that were kept separately are now part of the project (the dist/ subdirectory). --- examples/cxx/hybrid/library/makefile | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'examples/cxx/hybrid/library/makefile') diff --git a/examples/cxx/hybrid/library/makefile b/examples/cxx/hybrid/library/makefile index 24f8bf1..f0dbae1 100644 --- a/examples/cxx/hybrid/library/makefile +++ b/examples/cxx/hybrid/library/makefile @@ -21,8 +21,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. # @@ -51,6 +53,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)/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) @@ -79,6 +102,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/hybrid/xsd-cxx.make) -- cgit v1.1