summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-25 21:01:16 +0000
committerDavid Robillard <d@drobilla.net>2011-05-25 21:01:16 +0000
commit8d22c4305e8e6d9dcb6001cc9038310680d03bf8 (patch)
tree1413405a27b1430184193298987c806710c650bc
parent5e4c46142b8b42d7a842654c399cfca628810932 (diff)
downloadsuil-8d22c4305e8e6d9dcb6001cc9038310680d03bf8.tar.gz
suil-8d22c4305e8e6d9dcb6001cc9038310680d03bf8.tar.bz2
suil-8d22c4305e8e6d9dcb6001cc9038310680d03bf8.zip
Fix building documentation in recursive build
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@3332 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--wscript17
1 files changed, 12 insertions, 5 deletions
diff --git a/wscript b/wscript
index 90c7f21..636c419 100644
--- a/wscript
+++ b/wscript
@@ -114,23 +114,30 @@ def build(bld):
if bld.env['DOCS']:
bld.add_post_fun(fix_docs)
+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:
top = os.getcwd()
- os.chdir('build/doc/html')
+ os.chdir(build_dir(ctx, 'doc/html'))
os.system("sed -i 's/SUIL_API //' group__suil.html")
os.system("sed -i 's/SUIL_DEPRECATED //' group__suil.html")
os.remove('index.html')
os.symlink('group__suil.html',
'index.html')
os.chdir(top)
- os.chdir('build/doc/man/man3')
+ os.chdir(build_dir(ctx, 'doc/man/man3'))
os.system("sed -i 's/SUIL_API //' suil.3")
- except:
- Logs.error("Failed to fix up documentation\n")
+ os.chdir(top)
+ except Exception:
+ Logs.error("Failed to fix up %s documentation" % APPNAME)
def upload_docs(ctx):
- os.system("rsync -avz --delete -e ssh build/doc/html/* drobilla@drobilla.net:~/drobilla.net/docs/suil")
+ os.system("rsync -ravz --delete -e ssh build/doc/html/ drobilla@drobilla.net:~/drobilla.net/docs/suil/")
def lint(ctx):
subprocess.call('cpplint.py --filter=-whitespace,+whitespace/comments,-build/header_guard,-readability/casting,-readability/todo src/* suil/*', shell=True)