summaryrefslogtreecommitdiff
path: root/documentation/cxx/tree/manual/makefile
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/tree/manual/makefile
parentc34af468acc94691d0a5954eae38a89506bc620e (diff)
Integrate documentation generation into the build system
Diffstat (limited to 'documentation/cxx/tree/manual/makefile')
-rw-r--r--documentation/cxx/tree/manual/makefile53
1 files changed, 44 insertions, 9 deletions
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)