aboutsummaryrefslogtreecommitdiffstats
path: root/gendoc.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-11-21 02:00:42 +0000
committerDavid Robillard <d@drobilla.net>2011-11-21 02:00:42 +0000
commit27a265f350ca8f568b95bd3d94e62a62e91c05b7 (patch)
treec3d4816f767cca3894859934f2793d777606026f /gendoc.py
parenteb43c8896480114b224755e824fae2e2f7485256 (diff)
downloadlv2-27a265f350ca8f568b95bd3d94e62a62e91c05b7.tar.xz
Run everything from the build directory and don't pollute the source directory.
Diffstat (limited to 'gendoc.py')
-rwxr-xr-xgendoc.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/gendoc.py b/gendoc.py
index cf2e340..571d73a 100755
--- a/gendoc.py
+++ b/gendoc.py
@@ -21,19 +21,19 @@ except:
shutil.copytree('lv2/ns', 'build/ns',
ignore=shutil.ignore_patterns('.*', 'waf', 'wscript', '*.in'))
-# Copy stylesheet to build directory
try:
os.mkdir('build/aux')
except:
pass
+# Copy stylesheet to build directory
shutil.copy('lv2specgen/style.css', 'build/aux/style.css')
URIPREFIX = 'http://lv2plug.in/ns/'
DOXPREFIX = 'ns/doc/html/'
SPECGENDIR = os.path.abspath('lv2specgen')
STYLEPATH = os.path.abspath('build/aux/style.css')
-TAGFILE = os.path.abspath('doclinks')
+TAGFILE = os.path.abspath('build/doclinks')
BUILDDIR = os.path.abspath('build')
doap = rdflib.Namespace('http://usefulinc.com/ns/doap#')
@@ -43,9 +43,14 @@ rdf = rdflib.Namespace('http://www.w3.org/1999/02/22-rdf-syntax-ns#')
devnull = open(os.devnull, 'w')
+# Enter build directory
+print("Entering directory `%s'\n" % os.path.abspath('build'))
+oldcwd = os.getcwd()
+os.chdir('build')
+
# Generate code (headers) documentation
print('## Generating header documentation with doxygen ##')
-subprocess.call('doxygen', stdout=devnull)
+subprocess.call(['doxygen', '../Doxyfile'], stdout=devnull)
def rescue_tags(in_path, out_path):
"Rescue Doxygen tag file from XML hell."
@@ -96,10 +101,6 @@ def subst_file(template, output, dict):
i.close()
o.close()
-print("Entering directory `%s'" % os.path.abspath('build'))
-oldcwd = os.getcwd()
-os.chdir('build')
-
extensions = []
print('\n## Generating specification documentation with lv2specgen ##')
@@ -225,7 +226,7 @@ subst_file('../lv2/ns/index.html.in', 'ns/index.html',
{ '@ROWS@': index_rows,
'@TIME@': datetime.datetime.utcnow().strftime('%F %H:%M UTC') })
-print("\nLeaving directory `%s'" % os.path.abspath('build'))
+print("\nLeaving directory `%s'" % os.getcwd())
os.chdir(oldcwd)
devnull.close()