summaryrefslogtreecommitdiff
path: root/documentation/cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-09-18 11:03:38 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-09-18 11:03:38 +0200
commit95f7c4722399964142aac1813c72f566d84d4d72 (patch)
tree36172642e634ab67fc94faf99c7d89df3a6b92e5 /documentation/cxx
parentc34af468acc94691d0a5954eae38a89506bc620e (diff)
Integrate documentation generation into the build system
Diffstat (limited to 'documentation/cxx')
-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
4 files changed, 154 insertions, 27 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)