summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-09-18 00:27:49 +0000
committerDavid Robillard <d@drobilla.net>2011-09-18 00:27:49 +0000
commitdb0a34a2fdfed614b5bb72240a0da783979dd0b4 (patch)
tree5f4803ce1d905235d46d799bed347ad562c94f3b /wscript
parenta267e6c2f935fcab94e66e0f1c897a9357d5f3a9 (diff)
downloadzix-db0a34a2fdfed614b5bb72240a0da783979dd0b4.tar.gz
zix-db0a34a2fdfed614b5bb72240a0da783979dd0b4.tar.bz2
zix-db0a34a2fdfed614b5bb72240a0da783979dd0b4.zip
Build documentation.
git-svn-id: http://svn.drobilla.net/zix/trunk@11 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
Diffstat (limited to 'wscript')
-rw-r--r--wscript27
1 files changed, 22 insertions, 5 deletions
diff --git a/wscript b/wscript
index 2dc56b3..754fa2d 100644
--- a/wscript
+++ b/wscript
@@ -113,16 +113,21 @@ def build(bld):
obj.install_path = ''
# Documentation
- #autowaf.build_dox(bld, 'ZIX', ZIX_VERSION, top, out)
-
- # Man page
- #bld.install_files('${MANDIR}/man1', 'doc/zixi.1')
+ autowaf.build_dox(bld, 'ZIX', ZIX_VERSION, top, out)
bld.add_post_fun(autowaf.run_ldconfig)
+ if bld.env['DOCS']:
+ bld.add_post_fun(fix_docs)
def lint(ctx):
subprocess.call('cpplint.py --filter=-whitespace/tab,-whitespace/braces,-build/header_guard,-readability/casting,-readability/todo src/* zix/*', shell=True)
+def build_dir(ctx, subdir):
+ if autowaf.is_child():
+ return os.path.join('build', APPNAME, subdir)
+ else:
+ return os.path.join('build', subdir)
+
def fix_docs(ctx):
try:
os.chdir('build/doc/html')
@@ -131,8 +136,20 @@ def fix_docs(ctx):
os.remove('index.html')
os.symlink('group__zix.html',
'index.html')
+ except:
+ Logs.error("Failed to fix up %s documentation" % APPNAME)
+
+def fix_docs(ctx):
+ try:
+ top = os.getcwd()
+ os.chdir(build_dir(ctx, 'doc/html'))
+ os.system("sed -i 's/ZIX_API //' group__zix.html")
+ os.remove('index.html')
+ os.symlink('group__zix.html',
+ 'index.html')
+ os.chdir(top)
except Exception as e:
- Logs.error("Failed to fix up Doxygen documentation (%s)\n" % e)
+ Logs.error("Failed to fix up %s documentation (%s)" % (APPNAME, e))
def upload_docs(ctx):
os.system("rsync -avz --delete -e ssh build/doc/html/* drobilla@drobilla.net:~/drobilla.net/docs/zix")