[gnome-builder/wip/tingping/meson-sphinx] build: Add Meson targets for sphinx
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/tingping/meson-sphinx] build: Add Meson targets for sphinx
- Date: Thu, 16 Mar 2017 04:45:04 +0000 (UTC)
commit d616796a130b6cb88a1693db48d23381ea2c32a7
Author: Patrick Griffis <tingping tingping se>
Date: Thu Mar 16 00:44:00 2017 -0400
build: Add Meson targets for sphinx
doc/.gitignore | 2 ++
doc/conf.py | 3 +++
doc/meson.build | 12 ++++++++++++
meson.build | 1 +
4 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644
index 0000000..7f9e332
--- /dev/null
+++ b/doc/.gitignore
@@ -0,0 +1,2 @@
+/locale/.doctrees/
+/locale/*.pot
\ No newline at end of file
diff --git a/doc/conf.py b/doc/conf.py
index 0a6c9c6..c45d5a3 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -343,3 +343,6 @@ texinfo_documents = [
# If true, do not generate a @detailmenu in the "Top" node's menu.
#
# texinfo_no_detailmenu = False
+
+locale_dirs = ['locale/']
+language = 'en'
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 0000000..df953e7
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1,12 @@
+sphinx_build = find_program('sphinx-build', required: false)
+
+if sphinx_build.found()
+ # This would need to be done at 'dist' time which doesn't exist for Meson yet
+ run_target('sphinx-docs',
+ command: [sphinx_build, meson.current_source_dir(), meson.source_root() + '/html']
+ )
+
+ run_target('sphinx-docs-pot',
+ command: [sphinx_build, '-b', 'gettext', meson.current_source_dir(), 'locale']
+ )
+endif
\ No newline at end of file
diff --git a/meson.build b/meson.build
index 2f46685..c110cb7 100644
--- a/meson.build
+++ b/meson.build
@@ -171,6 +171,7 @@ subdir('data/fonts')
subdir('data/gsettings')
subdir('data/icons')
subdir('data/style-schemes')
+subdir('doc')
subdir('contrib/egg')
subdir('contrib/gd')
subdir('contrib/jsonrpc-glib')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]