summaryrefslogtreecommitdiffstats
path: root/bitbake/doc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/doc/Makefile')
-rw-r--r--bitbake/doc/Makefile91
1 files changed, 91 insertions, 0 deletions
diff --git a/bitbake/doc/Makefile b/bitbake/doc/Makefile
new file mode 100644
index 0000000000..8e98c57eb1
--- /dev/null
+++ b/bitbake/doc/Makefile
@@ -0,0 +1,91 @@
1# This is a single Makefile to handle all generated BitBake documents.
2# The Makefile needs to live in the documentation directory and all figures used
3# in any manuals must be .PNG files and live in the individual book's figures
4# directory.
5#
6# The Makefile has these targets:
7#
8# pdf: generates a PDF version of a manual.
9# html: generates an HTML version of a manual.
10# tarball: creates a tarball for the doc files.
11# validate: validates
12# clean: removes files
13#
14# The Makefile generates an HTML and PDF version of every document. The
15# variable DOC indicates the folder name for a given manual.
16#
17# To build a manual, you must invoke 'make' with the DOC argument.
18#
19# Examples:
20#
21# make DOC=bitbake-user-manual
22# make pdf DOC=bitbake-user-manual
23#
24# The first example generates the HTML and PDF versions of the User Manual.
25# The second example generates the HTML version only of the User Manual.
26#
27
28ifeq ($(DOC),bitbake-user-manual)
29XSLTOPTS = --stringparam html.stylesheet bitbake-user-manual-style.css \
30 --stringparam chapter.autolabel 1 \
31 --stringparam section.autolabel 1 \
32 --stringparam section.label.includes.component.label 1 \
33 --xinclude
34ALLPREQ = html pdf tarball
35TARFILES = bitbake-user-manual-style.css bitbake-user-manual.html bitbake-user-manual.pdf figures/bitbake-title.png
36MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
37FIGURES = figures
38STYLESHEET = $(DOC)/*.css
39
40endif
41
42##
43# These URI should be rewritten by your distribution's xml catalog to
44# match your localy installed XSL stylesheets.
45XSL_BASE_URI = http://docbook.sourceforge.net/release/xsl/current
46XSL_XHTML_URI = $(XSL_BASE_URI)/xhtml/docbook.xsl
47
48all: $(ALLPREQ)
49
50pdf:
51ifeq ($(DOC),bitbake-user-manual)
52 @echo " "
53 @echo "********** Building."$(DOC)
54 @echo " "
55 cd $(DOC); ../tools/docbook-to-pdf $(DOC).xml ../template; cd ..
56endif
57
58html:
59ifeq ($(DOC),bitbake-user-manual)
60# See http://www.sagehill.net/docbookxsl/HtmlOutput.html
61 @echo " "
62 @echo "******** Building "$(DOC)
63 @echo " "
64 cd $(DOC); xsltproc $(XSLTOPTS) -o $(DOC).html $(DOC)-customization.xsl $(DOC).xml; cd ..
65endif
66
67tarball: html
68 @echo " "
69 @echo "******** Creating Tarball of document files"
70 @echo " "
71 cd $(DOC); tar -cvzf $(DOC).tgz $(TARFILES); cd ..
72
73validate:
74 cd $(DOC); xmllint --postvalid --xinclude --noout $(DOC).xml; cd ..
75
76publish:
77 @if test -f $(DOC)/$(DOC).html; \
78 then \
79 echo " "; \
80 echo "******** Publishing "$(DOC)".html"; \
81 echo " "; \
82 scp -r $(MANUALS) $(STYLESHEET) docs.yp:/var/www/www.yoctoproject.org-docs/$(VER)/$(DOC); \
83 cd $(DOC); scp -r $(FIGURES) docs.yp:/var/www/www.yoctoproject.org-docs/$(VER)/$(DOC); \
84 else \
85 echo " "; \
86 echo $(DOC)".html missing. Generate the file first then try again."; \
87 echo " "; \
88 fi
89
90clean:
91 rm -rf $(MANUALS); rm $(DOC)/$(DOC).tgz;