diff options
author | David Robillard <d@drobilla.net> | 2011-05-25 21:00:47 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-05-25 21:00:47 +0000 |
commit | 0747ae3b208aa88b882c49a2d3b148017f9baf57 (patch) | |
tree | 437ceb03ddaf46533a0c9705de924a8d2daca95d | |
parent | a0815d37418e18d3f0a36b3388895b5f6fe7b431 (diff) | |
download | serd-0747ae3b208aa88b882c49a2d3b148017f9baf57.tar.gz serd-0747ae3b208aa88b882c49a2d3b148017f9baf57.tar.bz2 serd-0747ae3b208aa88b882c49a2d3b148017f9baf57.zip |
Fix building documentation in recursive build
git-svn-id: http://svn.drobilla.net/serd/trunk@201 490d8e77-9747-427b-9fa3-0b8f29cee8a0
-rw-r--r-- | wscript | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -159,38 +159,39 @@ def amalgamate(ctx): amalgamation.close() +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/SERD_API //' group__serd.html") os.system("sed -i 's/SERD_DEPRECATED //' group__serd.html") os.remove('index.html') os.symlink('group__serd.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/SERD_API //' serd.3") + os.chdir(top) except: - Logs.error("Failed to fix up documentation") + Logs.error("Failed to fix up %s documentation" % APPNAME) def upload_docs(ctx): os.system("rsync -ravz --delete -e ssh build/doc/html/ drobilla@drobilla.net:~/drobilla.net/docs/serd/") def test(ctx): - blddir = "" - top_level = (len(ctx.stack_path) > 1) - if top_level: - blddir = 'build/serd/tests' - else: - blddir = 'build/tests' - + blddir = build_dir(ctx, 'tests') try: os.makedirs(blddir) except: pass - for i in glob.glob('build/tests/*.*'): + for i in glob.glob(blddir + '/*.*'): os.remove(i) srcdir = ctx.path.abspath() |