summaryrefslogtreecommitdiffstats
path: root/bitbake/doc/Makefile
diff options
context:
space:
mode:
authorNicolas Dechesne <nicolas.dechesne@linaro.org>2020-11-13 00:21:41 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-04 10:55:00 +0000
commit22384b2fe567406b3c318b2edd0d23dee0d72023 (patch)
treeb19414c699324722f371d4138c305e925a43da95 /bitbake/doc/Makefile
parent16d477fa5d2bec49ccd83ede8249431d30e0c80c (diff)
downloadpoky-22384b2fe567406b3c318b2edd0d23dee0d72023.tar.gz
bitbake: sphinx: import sphinx docs
The Bitbake manual was migrated to Sphinx in Yocto Project 3.2. Since the docs between 3.2 and 3.1 are "similar", and since 3.1 is an LTS release, we agreed to backport the documentation onto 3.1. If we look at all docs changes in 3.1 and 3.2, we have the following: === Changes in 3.1 git log --oneline b94dec477a8d48ebceec91952ba290798c56c1f5..origin/1.46 -- doc/ ==== 324aaa7f bitbake-user-manual-metadata.xml: fix a minor error f92e19a3 doc: More explanation to tasks that recursively depend on themselves e4695176 doc: Clarify how task dependencies relate to RDEPENDS 25c5c79b user manual: properly tag content as <replaceable> be367887 docs: delete reference to obsolete recipe-depends.dot === Changes in 3.2/master git log --oneline b94dec477a8d48ebceec91952ba290798c56c1f5..origin/master -- doc/ ==== a7c47f1e sphinx: rename Makefile.sphinx 427721d8 sphinx: remove DocBook files d52190ea docs: static: theme_overrides.css: fix responsive design on <640px screens 9ae5cce7 docs: sphinx: report errors when dependencies are not met ec4c481a docs: update README file after migrationg to Sphinx c87cc35a docs: sphinx: replace special quotes with double quotes ebdeef2c docs: ref-variables: add links to terms in glossary 29081375 bitbake-user-manual: fix bad links a0f37789 sphinx: theme_override: Use bold for emphasis text cbc5ca48 sphinx: theme_override: properly set font for verbatim text 08b1ae23 sphinx: remove leading '/' 99ba6fe9 sphinx: update style for important, caution and warnings d99760cc sphinx: last manual round of fixes/improvements 4f94633a sphinx: bitbake-user-manual: insert additional blank line after title 63adcaa5 sphinx: add releases page 3e940d93 sphinx: conf: enable extlinks extension 9921c652 sphinx: index: move the boilerplate at the end of the page 4e461224 sphinx: add SPDX headers cb19159c sphinx: Enhance the sphinx experience/nagivation with: 10a54678 sphinx: tweak html output a bit 219b2348 sphinx: Makefile.sphinx: add clean and publish targets 35fdc185 sphinx: fixes all remaining warnings e11d2dd1 sphinx: fix links inside notes 57300955 sphinx: fixup for links fa304c01 sphinx: override theme CSS 29af1cd2 sphinx: switch to readthedocs theme e8359fd8 sphinx: bitbake-user-manual: use builtin sphinx glossary 6bf6c8d6 sphinx: initial sphinx support 84ccba0f sphinx: add initial build infrastructure 44b57216 bitbake-user-manual: update perforce fetcher docs 9186ca47 bitbake-user-manual: Add BBFILES_DYNAMIC 7689fa78 bitbake-user-manual: Remove TERM from BB_HASHBASE_WHITELIST example 06b5cf0a bitbake-user-manual-metadata.xml: fix a minor error c92a266c doc: More explanation to tasks that recursively depend on themselves caf42243 doc: Clarify how task dependencies relate to RDEPENDS 647c13d4 user manual: properly tag content as <replaceable> 2effbb6e docs: delete reference to obsolete recipe-depends.dot We can conclude the following commits exist in 3.2 and not in 3.1 (if we filter out sphinx changes) 44b57216 bitbake-user-manual: update perforce fetcher docs 9186ca47 bitbake-user-manual: Add BBFILES_DYNAMIC 7689fa78 bitbake-user-manual: Remove TERM from BB_HASHBASE_WHITELIST example Out of these 3 changes, the following patches are for 3.2 only: 44b57216 bitbake-user-manual: update perforce fetcher docs 7689fa78 bitbake-user-manual: Remove TERM from BB_HASHBASE_WHITELIST example To backport the Sphinx docs, we then need to cherry-pick all docs patches from 3.2/1.48 and 'undo' the two patches above. This first patch is the first step that imports all Sphinx files, and remove Docbook files. It was done with the following command: git cherry-pick -n \ $(git log --reverse --oneline \ b94dec477a8d48ebceec91952ba290798c56c1f5..origin/master -- doc/ \ | cut -f1 -d' ') (Bitbake rev: cd68f14031eb45006b44d10b348e35c69ac21ad0) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/doc/Makefile')
-rw-r--r--bitbake/doc/Makefile108
1 files changed, 26 insertions, 82 deletions
diff --git a/bitbake/doc/Makefile b/bitbake/doc/Makefile
index 3c28f4b222..4d721d30f3 100644
--- a/bitbake/doc/Makefile
+++ b/bitbake/doc/Makefile
@@ -1,91 +1,35 @@
1# This is a single Makefile to handle all generated BitBake documents. 1# Minimal makefile for Sphinx documentation
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 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 version of the User Manual.
25# The second example generates the PDF version of the User Manual.
26# 2#
27 3
28ifeq ($(DOC),bitbake-user-manual) 4# You can set these variables from the command line, and also
29XSLTOPTS = --stringparam html.stylesheet bitbake-user-manual-style.css \ 5# from the environment for the first two.
30 --stringparam chapter.autolabel 1 \ 6SPHINXOPTS ?=
31 --stringparam section.autolabel 1 \ 7SPHINXBUILD ?= sphinx-build
32 --stringparam section.label.includes.component.label 1 \ 8SOURCEDIR = .
33 --xinclude 9BUILDDIR = _build
34ALLPREQ = html tarball 10DESTDIR = final
35TARFILES = bitbake-user-manual-style.css bitbake-user-manual.html figures/bitbake-title.png
36MANUALS = $(DOC)/$(DOC).html
37FIGURES = figures
38STYLESHEET = $(DOC)/*.css
39 11
12ifeq ($(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi),0)
13$(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed")
40endif 14endif
41 15
42## 16# Put it first so that "make" without argument is like "make help".
43# These URI should be rewritten by your distribution's xml catalog to 17help:
44# match your localy installed XSL stylesheets. 18 @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
45XSL_BASE_URI = http://docbook.sourceforge.net/release/xsl/current
46XSL_XHTML_URI = $(XSL_BASE_URI)/xhtml/docbook.xsl
47 19
48all: $(ALLPREQ) 20.PHONY: help Makefile clean publish
49 21
50pdf: 22publish: Makefile html singlehtml
51ifeq ($(DOC),bitbake-user-manual) 23 rm -rf $(BUILDDIR)/$(DESTDIR)/
52 @echo " " 24 mkdir -p $(BUILDDIR)/$(DESTDIR)/
53 @echo "********** Building."$(DOC) 25 cp -r $(BUILDDIR)/html/* $(BUILDDIR)/$(DESTDIR)/
54 @echo " " 26 cp $(BUILDDIR)/singlehtml/index.html $(BUILDDIR)/$(DESTDIR)/singleindex.html
55 cd $(DOC); ../tools/docbook-to-pdf $(DOC).xml ../template; cd .. 27 sed -i -e 's@index.html#@singleindex.html#@g' $(BUILDDIR)/$(DESTDIR)/singleindex.html
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 28
90clean: 29clean:
91 rm -rf $(MANUALS); rm $(DOC)/$(DOC).tgz; 30 @rm -rf $(BUILDDIR)
31
32# Catch-all target: route all unknown targets to Sphinx using the new
33# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
34%: Makefile
35 @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)