[gnome-builder] build: cleanup sphinx builds
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] build: cleanup sphinx builds
- Date: Mon, 19 Jun 2017 05:17:09 +0000 (UTC)
commit 437ad003c7107d4e14fd8e27c2462ac0bcfa31dc
Author: Christian Hergert <chergert redhat com>
Date: Sun Jun 18 22:16:48 2017 -0700
build: cleanup sphinx builds
We can generate the version to go in conf.py, so do that to avoid having
things wrong in a future release.
Also cleanup checking for sphinx-build.
doc/{conf.py => conf.py.in} | 18 +++++++-----------
doc/meson.build | 21 ++++++++++++---------
2 files changed, 19 insertions(+), 20 deletions(-)
---
diff --git a/doc/conf.py b/doc/conf.py.in
similarity index 95%
rename from doc/conf.py
rename to doc/conf.py.in
index ffaf681..7c58cd5 100644
--- a/doc/conf.py
+++ b/doc/conf.py.in
@@ -58,9 +58,9 @@ author = 'Christian Hergert, et al.'
# built documents.
#
# The short X.Y version.
-version = '3.25'
+version = @VERSION@
# The full version, including alpha/beta/rc tags.
-release = '3.25'
+release = @VERSION@
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -155,7 +155,7 @@ html_context = {
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#
-html_favicon = 'favicon,ico'
+html_favicon = 'favicon.ico'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
@@ -240,7 +240,7 @@ html_static_path = ['_static']
# html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
-htmlhelp_basename = 'Builderdoc'
+htmlhelp_basename = 'Builder'
# -- Options for LaTeX output ---------------------------------------------
@@ -266,8 +266,7 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
- (master_doc, 'Builder.tex', 'Builder Documentation',
- 'Christian Hergert, et al.', 'manual'),
+ (master_doc, 'Builder.tex', 'Builder Documentation', 'Christian Hergert, et al.', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -308,8 +307,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- (master_doc, 'builder', 'Builder Documentation',
- [author], 1)
+ (master_doc, 'builder', 'Builder Documentation', [author], 1)
]
# If true, show URL addresses after external links.
@@ -323,9 +321,7 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- (master_doc, 'Builder', 'Builder Documentation',
- author, 'Builder', 'One line description of project.',
- 'Miscellaneous'),
+ (master_doc, 'Builder', 'Builder Documentation', author, 'Builder', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
diff --git a/doc/meson.build b/doc/meson.build
index 1adbad2..2081aae 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -1,20 +1,23 @@
if get_option('with_docs')
-sphinx = find_program('sphinx-build-3', required: false)
-if not sphinx.found()
- sphinx = find_program('sphinx-build', required: false)
-endif
+conf_py_data = configuration_data()
+conf_py_data.set_quoted('VERSION', meson.project_version())
-if sphinx.found()
- docs_sources = [
- ]
+configure_file(
+ input: 'conf.py.in',
+ output: 'conf.py',
+ configuration: conf_py_data,
+)
+
+sphinx = find_program(['sphinx-build-3', 'sphinx-build'], required: false)
+if sphinx.found()
custom_target('en user documentation',
- command: [sphinx, '-b', 'html', meson.current_source_dir(), '@OUTPUT@'],
- input: docs_sources,
+ command: [sphinx, '-b', 'html', '-c', meson.current_build_dir(),
meson.current_source_dir(), '@OUTPUT@'],
output: 'en',
build_by_default: true)
+
install_subdir(meson.current_build_dir() + '/en', install_dir: pkgdocdir_abs)
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]