aboutsummaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-26 16:07:41 +0100
committerDavid Robillard <d@drobilla.net>2020-11-26 17:09:15 +0100
commit503ba93a4ebf316ab01b468808e4cda2da8b863e (patch)
treeebfbcd7829879def472028617abeb021c9a26e64 /wscript
parentcaf3f4fc314608d8d8f8be853f4bde6bb50188b0 (diff)
downloadpugl-503ba93a4ebf316ab01b468808e4cda2da8b863e.tar.gz
pugl-503ba93a4ebf316ab01b468808e4cda2da8b863e.tar.bz2
pugl-503ba93a4ebf316ab01b468808e4cda2da8b863e.zip
Generate documentation with Sphinx
Diffstat (limited to 'wscript')
-rw-r--r--wscript18
1 files changed, 13 insertions, 5 deletions
diff --git a/wscript b/wscript
index e500d38..627539c 100644
--- a/wscript
+++ b/wscript
@@ -159,6 +159,14 @@ def configure(conf):
'-Wno-direct-ivar-access'],
})
+ if conf.env.DOCS:
+ conf.load('python')
+ conf.load('sphinx')
+ conf.find_program('doxygen', var='DOXYGEN')
+
+ if not (conf.env.DOXYGEN and conf.env.SPHINX_BUILD):
+ conf.env.DOCS = False
+
sys_header = 'windows.h' if platform == 'win32' else ''
if not Options.options.no_vulkan:
@@ -270,7 +278,9 @@ def configure(conf):
conf.env.update({
'BUILD_SHARED': not Options.options.no_shared,
'BUILD_STATIC': conf.env.BUILD_TESTS or not Options.options.no_static,
- 'BUILD_STRICT_HEADER_TEST': Options.options.strict})
+ 'BUILD_STRICT_HEADER_TEST': Options.options.strict,
+ 'PUGL_MAJOR_VERSION': PUGL_MAJOR_VERSION,
+ })
if conf.env.TARGET_PLATFORM == 'win32':
conf.env.PUGL_PLATFORM = 'win'
@@ -672,10 +682,8 @@ def build(bld):
uselib=['GL', 'M'])
if bld.env.DOCS:
- autowaf.build_dox(
- bld, 'PUGL', PUGL_VERSION, top, out, install_man=False)
- bld.install_files('${MANDIR}/man3', 'doc/man/man3/pugl.3')
- bld.install_files('${MANDIR}/man3', 'doc/man/man3/puglxx.3')
+ bld.recurse('doc/c')
+ bld.recurse('doc/cpp')
def test(tst):