summaryrefslogtreecommitdiff
path: root/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'documentation')
-rw-r--r--documentation/cxx/makefile20
-rw-r--r--documentation/cxx/parser/guide/makefile55
-rw-r--r--documentation/cxx/tree/guide/makefile53
-rw-r--r--documentation/cxx/tree/manual/makefile53
-rw-r--r--documentation/makefile14
5 files changed, 166 insertions, 29 deletions
diff --git a/documentation/cxx/makefile b/documentation/cxx/makefile
new file mode 100644
index 0000000..551aef4
--- /dev/null
+++ b/documentation/cxx/makefile
@@ -0,0 +1,20 @@
+# file : documentation/cxx/makefile
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2006-2009 Code Synthesis Tools CC
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
+
+docs := parser/guide tree/guide tree/manual
+
+default := $(out_base)/
+dist := $(out_base)/.dist
+dist-win := $(out_base)/.dist-win
+cleandoc := $(out_base)/.cleandoc
+
+$(default): $(addprefix $(out_base)/,$(addsuffix /,$(docs)))
+$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(docs)))
+$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(docs)))
+$(cleandoc): $(addprefix $(out_base)/,$(addsuffix /.cleandoc,$(docs)))
+
+$(foreach m,$(docs),$(call import,$(src_base)/$m/makefile))
diff --git a/documentation/cxx/parser/guide/makefile b/documentation/cxx/parser/guide/makefile
index ca76286..1d85874 100644
--- a/documentation/cxx/parser/guide/makefile
+++ b/documentation/cxx/parser/guide/makefile
@@ -1,12 +1,49 @@
-.PHONY: all
-all: cxx-parser-guide.ps cxx-parser-guide.pdf
+# file : documentation/cxx/parser/guide/makefile
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2006-2009 Code Synthesis Tools CC
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-cxx-parser-guide.pdf: cxx-parser-guide.ps
- ps2pdf14 $<
+include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-cxx-parser-guide.ps: index.xhtml guide.html2ps
- html2ps -f guide.html2ps -o $@ $<
+default := $(out_base)/
+dist := $(out_base)/.dist
+dist-win := $(out_base)/.dist-win
+cleandoc := $(out_base)/.cleandoc
-.PHONY: clean
-clean:
- rm -f cxx-parser-guide.ps cxx-parser-guide.pdf
+.PHONY: $(default) $(dist) $(dist-win) $(cleandoc)
+
+# Build.
+#
+$(default): $(out_base)/cxx-parser-guide.ps $(out_base)/cxx-parser-guide.pdf
+
+
+$(out_base)/cxx-parser-guide.ps: $(src_base)/index.xhtml \
+ $(src_base)/figure-1.png \
+ $(src_base)/guide.html2ps \
+ | $(out_base)/.
+ $(call message,html2ps $<,html2ps -f $(src_base)/guide.html2ps -o $@ $<)
+
+$(out_base)/cxx-parser-guide.pdf: $(out_base)/cxx-parser-guide.ps | $(out_base)/.
+ $(call message,ps2pdf $<,ps2pdf14 $< $@)
+
+# Dist.
+#
+$(dist): path := $(subst $(src_root)/,,$(src_base))
+$(dist): $(out_base)/cxx-parser-guide.ps $(out_base)/cxx-parser-guide.pdf
+ $(call install-data,$(src_base)/figure-1.png,$(dist_prefix)/$(path)/figure-1.png)
+ $(call install-data,$(src_base)/index.xhtml,$(dist_prefix)/$(path)/index.xhtml)
+ $(call install-data,$(out_base)/cxx-parser-guide.ps,$(dist_prefix)/$(path)/cxx-parser-guide.ps)
+ $(call install-data,$(out_base)/cxx-parser-guide.pdf,$(dist_prefix)/$(path)/cxx-parser-guide.pdf)
+
+$(dist-win): $(dist)
+
+
+# Clean
+#
+$(cleandoc):
+ $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-parser-guide.ps)
+ $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-parser-guide.pdf)
+
+# How to.
+#
+$(call include,$(bld_root)/install.make)
diff --git a/documentation/cxx/tree/guide/makefile b/documentation/cxx/tree/guide/makefile
index 188b419..7c52f36 100644
--- a/documentation/cxx/tree/guide/makefile
+++ b/documentation/cxx/tree/guide/makefile
@@ -1,12 +1,47 @@
-.PHONY: all
-all: cxx-tree-guide.ps cxx-tree-guide.pdf
+# file : documentation/cxx/tree/guide/makefile
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2006-2009 Code Synthesis Tools CC
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-cxx-tree-guide.pdf: cxx-tree-guide.ps
- ps2pdf14 $<
+include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-cxx-tree-guide.ps: index.xhtml guide.html2ps
- html2ps -f guide.html2ps -o $@ $<
+default := $(out_base)/
+dist := $(out_base)/.dist
+dist-win := $(out_base)/.dist-win
+cleandoc := $(out_base)/.cleandoc
-.PHONY: clean
-clean:
- rm -f cxx-tree-guide.ps cxx-tree-guide.pdf
+.PHONY: $(default) $(dist) $(dist-win) $(cleandoc)
+
+# Build.
+#
+$(default): $(out_base)/cxx-tree-guide.ps $(out_base)/cxx-tree-guide.pdf
+
+
+$(out_base)/cxx-tree-guide.ps: $(src_base)/index.xhtml \
+ $(src_base)/guide.html2ps \
+ | $(out_base)/.
+ $(call message,html2ps $<,html2ps -f $(src_base)/guide.html2ps -o $@ $<)
+
+$(out_base)/cxx-tree-guide.pdf: $(out_base)/cxx-tree-guide.ps | $(out_base)/.
+ $(call message,ps2pdf $<,ps2pdf14 $< $@)
+
+# Dist.
+#
+$(dist): path := $(subst $(src_root)/,,$(src_base))
+$(dist): $(out_base)/cxx-tree-guide.ps $(out_base)/cxx-tree-guide.pdf
+ $(call install-data,$(src_base)/index.xhtml,$(dist_prefix)/$(path)/index.xhtml)
+ $(call install-data,$(out_base)/cxx-tree-guide.ps,$(dist_prefix)/$(path)/cxx-tree-guide.ps)
+ $(call install-data,$(out_base)/cxx-tree-guide.pdf,$(dist_prefix)/$(path)/cxx-tree-guide.pdf)
+
+$(dist-win): $(dist)
+
+
+# Clean
+#
+$(cleandoc):
+ $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-tree-guide.ps)
+ $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-tree-guide.pdf)
+
+# How to.
+#
+$(call include,$(bld_root)/install.make)
diff --git a/documentation/cxx/tree/manual/makefile b/documentation/cxx/tree/manual/makefile
index bfdd6d3..1586cfb 100644
--- a/documentation/cxx/tree/manual/makefile
+++ b/documentation/cxx/tree/manual/makefile
@@ -1,12 +1,47 @@
-.PHONY: all
-all: cxx-tree-manual.ps cxx-tree-manual.pdf
+# file : documentation/cxx/tree/manual/makefile
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2006-2009 Code Synthesis Tools CC
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-cxx-tree-manual.pdf: cxx-tree-manual.ps
- ps2pdf14 $<
+include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-cxx-tree-manual.ps: index.xhtml manual.html2ps
- html2ps -f manual.html2ps -o $@ $<
+default := $(out_base)/
+dist := $(out_base)/.dist
+dist-win := $(out_base)/.dist-win
+cleandoc := $(out_base)/.cleandoc
-.PHONY: clean
-clean:
- rm -f cxx-tree-manual.ps cxx-tree-manual.pdf
+.PHONY: $(default) $(dist) $(dist-win) $(cleandoc)
+
+# Build.
+#
+$(default): $(out_base)/cxx-tree-manual.ps $(out_base)/cxx-tree-manual.pdf
+
+
+$(out_base)/cxx-tree-manual.ps: $(src_base)/index.xhtml \
+ $(src_base)/manual.html2ps \
+ | $(out_base)/.
+ $(call message,html2ps $<,html2ps -f $(src_base)/manual.html2ps -o $@ $<)
+
+$(out_base)/cxx-tree-manual.pdf: $(out_base)/cxx-tree-manual.ps | $(out_base)/.
+ $(call message,ps2pdf $<,ps2pdf14 $< $@)
+
+# Dist.
+#
+$(dist): path := $(subst $(src_root)/,,$(src_base))
+$(dist): $(out_base)/cxx-tree-manual.ps $(out_base)/cxx-tree-manual.pdf
+ $(call install-data,$(src_base)/index.xhtml,$(dist_prefix)/$(path)/index.xhtml)
+ $(call install-data,$(out_base)/cxx-tree-manual.ps,$(dist_prefix)/$(path)/cxx-tree-manual.ps)
+ $(call install-data,$(out_base)/cxx-tree-manual.pdf,$(dist_prefix)/$(path)/cxx-tree-manual.pdf)
+
+$(dist-win): $(dist)
+
+
+# Clean
+#
+$(cleandoc):
+ $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-tree-manual.ps)
+ $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-tree-manual.pdf)
+
+# How to.
+#
+$(call include,$(bld_root)/install.make)
diff --git a/documentation/makefile b/documentation/makefile
index 3fd6133..7d581ac 100644
--- a/documentation/makefile
+++ b/documentation/makefile
@@ -5,10 +5,14 @@
include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make
-install := $(out_base)/.install
+default := $(out_base)/
+install := $(out_base)/.install
+cleandoc := $(out_base)/.cleandoc
-.PHONY: $(install)
+$(default): $(out_base)/cxx/
+# Install.
+#
$(install):
$(call install-dir,$(src_base)/cxx,$(install_doc_dir)/xsd/cxx)
$(call install-data,$(src_base)/default.css,$(install_doc_dir)/xsd/default.css)
@@ -17,4 +21,10 @@ $(install):
$(call install-data,$(src_base)/xsd.xhtml,$(install_doc_dir)/xsd/xsd.xhtml)
$(call install-data,$(src_base)/xsd.1,$(install_man_dir)/man1/xsd.1)
+# Clean.
+#
+$(cleandoc): $(src_base)/cxx/.cleandoc
+
$(call include,$(bld_root)/install.make)
+
+$(call import,$(src_base)/cxx/makefile)