aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-09-06 01:25:53 +0000
committerDavid Robillard <d@drobilla.net>2012-09-06 01:25:53 +0000
commit4acfb4730957f814a36ed66421409e73775de6d8 (patch)
treeb0f45030eafdf13490b7f2ed31e0cca4a72f4f27
parentd81c616900c1c4fe3497c5462a8e9af89dc9600f (diff)
downloadlv2-4acfb4730957f814a36ed66421409e73775de6d8.tar.xz
Make documentation suitable for local installation.
-rw-r--r--doc/header.html24
-rw-r--r--doc/mainpage.dox4
-rw-r--r--doc/reference.doxygen.in5
-rwxr-xr-xlv2specgen/lv2specgen.py25
-rw-r--r--lv2specgen/template.html2
-rwxr-xr-xwafbin93483 -> 72017 bytes
-rw-r--r--wscript40
7 files changed, 73 insertions, 27 deletions
diff --git a/doc/header.html b/doc/header.html
new file mode 100644
index 0000000..6ff2e60
--- /dev/null
+++ b/doc/header.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>LV2: File List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxy-style.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td style="padding-left: 0.5em;">
+ <div id="projectname">LV2
+ &#160;<span id="projectnumber">1.0.13</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
diff --git a/doc/mainpage.dox b/doc/mainpage.dox
index 078f67d..920ef1d 100644
--- a/doc/mainpage.dox
+++ b/doc/mainpage.dox
@@ -1,7 +1,7 @@
/** @mainpage
*
* This is the documentation for the LV2 specification and its
- * extensions hosted at http://lv2plug.in.
+ * official extensions.
*
* An LV2 extension generally has two parts: the specification in
* <a href="http://www.w3.org/TeamSubmission/turtle/">Turtle</a>
@@ -12,7 +12,7 @@
* documentation generated from Turtle with
* <a href="http://drobilla.net/software/lv2specgen">lv2specgen</a>.
*
- * \li <a href="../../">LV2 Specifications</a>
+ * \li <a href="../../ns/index.html">LV2 Specifications</a>
* \li <a href="annotated.html">Data Structures</a>
* \li <a href="files.html">Headers</a>
*/
diff --git a/doc/reference.doxygen.in b/doc/reference.doxygen.in
index 88fe7ea..718a74c 100644
--- a/doc/reference.doxygen.in
+++ b/doc/reference.doxygen.in
@@ -666,6 +666,7 @@ INPUT = @LV2_SRCDIR@/doc/mainpage.dox \
lv2/lv2plug.in/ns/ext/event/event.h \
lv2/lv2plug.in/ns/ext/instance-access/instance-access.h \
lv2/lv2plug.in/ns/ext/log/log.h \
+ lv2/lv2plug.in/ns/ext/midi/midi.h \
lv2/lv2plug.in/ns/ext/morph/morph.h \
lv2/lv2plug.in/ns/ext/options/options.h \
lv2/lv2plug.in/ns/ext/patch/patch.h \
@@ -906,7 +907,7 @@ HTML_FILE_EXTENSION = .html
# have to redo this when upgrading to a newer version of doxygen or when
# changing the value of configuration settings such as GENERATE_TREEVIEW!
-HTML_HEADER =
+HTML_HEADER = @LV2_SRCDIR@/doc/header.html
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
# each generated HTML page. If it is left blank doxygen will generate a
@@ -1730,7 +1731,7 @@ GRAPHICAL_HIERARCHY = YES
# in a graphical way. The dependency relations are determined by the #include
# relations between the files in the directories.
-DIRECTORY_GRAPH = YES
+DIRECTORY_GRAPH = NO
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
# generated by dot. Possible values are svg, png, jpg, or gif.
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index 9974265..28a84db 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -1037,7 +1037,7 @@ def load_tags(path, docdir):
return linkmap
-def specgen(specloc, indir, style_uri, docdir, tags, instances=False, mode="spec"):
+def specgen(specloc, indir, style_uri, docdir, tags, instances=False, offline=False):
"""The meat and potatoes: Everything starts here."""
global spec_url
@@ -1159,9 +1159,7 @@ def specgen(specloc, indir, style_uri, docdir, tags, instances=False, mode="spec
template = template.replace('@REVISION@', version_string)
-
- header_files = ''
- other_files = ''
+ file_list = ''
see_also_files = specProperties(m, spec, rdfs.seeAlso)
see_also_files.sort()
for f in see_also_files:
@@ -1173,21 +1171,22 @@ def specgen(specloc, indir, style_uri, docdir, tags, instances=False, mode="spec
else:
continue # Skip seeAlso file outside bundle
-
- entry = '<a href="%s">%s</a>' % (uri, uri)
+
+ if offline:
+ entry = uri
+ else:
+ entry = '<a href="%s">%s</a>' % (uri, uri)
if uri.endswith('.h') or uri.endswith('.hpp'):
name = os.path.basename(uri)
- entry += ' (<a href="%s">Documentation</a>) ' % (
+ entry += ' - <a href="%s">Documentation</a> ' % (
docdir + '/' + name.replace('.', '_8') + '.html')
- header_files += '<li>%s</li>' % entry
+ file_list += '<li>%s</li>' % entry
else:
- other_files += '<li>%s</li>' % entry
+ file_list += '<li>%s</li>' % entry
files = ''
- if header_files:
- files += '<li>API<ul>%s</ul></li>' % header_files
- if other_files:
- files += '<li>Data<ul>%s</ul></li>' % other_files
+ if file_list:
+ files += '<li>Files<ul>%s</ul></li>' % file_list
template = template.replace('@FILES@', files)
diff --git a/lv2specgen/template.html b/lv2specgen/template.html
index 4544323..691f6fd 100644
--- a/lv2specgen/template.html
+++ b/lv2specgen/template.html
@@ -84,7 +84,7 @@
href="http://jigsaw.w3.org/css-validator/check/referer">
CSS
</a>
- generated on <span about="" rel="dc:created">@TIME@</span> from <a href="./@FILENAME@">@FILENAME@</a> by <a href="http://drobilla.net/software/lv2specgen">lv2specgen</a>
+ generated from @FILENAME@ by <a href="http://drobilla.net/software/lv2specgen">lv2specgen</a>
</div>
</div>
diff --git a/waf b/waf
index d4671db..02c8093 100755
--- a/waf
+++ b/waf
Binary files differ
diff --git a/wscript b/wscript
index f287e3b..937d3f5 100644
--- a/wscript
+++ b/wscript
@@ -25,6 +25,8 @@ def options(opt):
autowaf.set_options(opt)
opt.add_option('--test', action='store_true', dest='build_tests',
help='Build unit tests')
+ opt.add_option('--online-docs', action='store_true', dest='online_docs',
+ help='Build documentation for web hosting')
opt.add_option('--no-plugins', action='store_true', dest='no_plugins',
help='Do not build example plugins')
opt.add_option('--copy-headers', action='store_true', dest='copy_headers',
@@ -41,6 +43,9 @@ def configure(conf):
autowaf.configure(conf)
autowaf.set_c99_mode(conf)
+ if Options.options.online_docs and Options.options.docs:
+ conf.fatal('At most one of --online-docs and --docs may be given')
+
if Options.platform == 'win32' or not hasattr(os.path, 'relpath'):
Logs.warn('System does not support linking headers, copying')
Options.options.copy_headers = True
@@ -48,6 +53,7 @@ def configure(conf):
conf.env.BUILD_TESTS = Options.options.build_tests
conf.env.BUILD_PLUGINS = not Options.options.no_plugins
conf.env.COPY_HEADERS = Options.options.copy_headers
+ conf.env.ONLINE_DOCS = Options.options.online_docs
# Check for gcov library (for test coverage)
if conf.env.BUILD_TESTS and not conf.is_defined('HAVE_GCOV'):
@@ -156,13 +162,17 @@ def specgen(task):
os.path.relpath(STYLEPATH, bundle),
os.path.relpath('build/doc/html', bundle),
TAGFILE,
- instances=True)
+ instances=True,
+ offline=(not task.env.ONLINE_DOCS))
lv2specgen.save(task.outputs[0].abspath(), specdoc)
# Name (comment is to act as a sort key)
+ target = path[len('lv2/lv2plug.in/ns/'):]
+ if not task.env.ONLINE_DOCS:
+ target += '/%s.html' % b
row = '<tr><!-- %s --><td><a rel="rdfs:seeAlso" href="%s">%s</a></td>' % (
- b, path[len('lv2/lv2plug.in/ns/'):], b)
+ b, target, b)
# Description
if shortdesc:
@@ -300,7 +310,7 @@ def build(bld):
if bld.env.DOCS:
# Build Doxygen documentation (and tags file)
- autowaf.build_dox(bld, 'LV2', VERSION, top, out)
+ autowaf.build_dox(bld, 'LV2', VERSION, top, out, 'lv2plug.in/doc')
# Copy stylesheet to build directory
bld(features = 'subst',
@@ -326,12 +336,13 @@ def build(bld):
name = os.path.basename(i.srcpath())
# Generate .htaccess file
- bld(features = 'subst',
- source = 'doc/htaccess.in',
- target = os.path.join(base, '.htaccess'),
- install_path = None,
- NAME = name,
- BASE = base)
+ if bld.env.ONLINE_DOCS:
+ bld(features = 'subst',
+ source = 'doc/htaccess.in',
+ target = os.path.join(base, '.htaccess'),
+ install_path = None,
+ NAME = name,
+ BASE = base)
# Call lv2specgen for each spec
for i in specs:
@@ -348,6 +359,12 @@ def build(bld):
target = ['%s/%s.html' % (chop_lv2_prefix(i.srcpath()), name),
index_file])
+ # Install documentation
+ if not bld.env.ONLINE_DOCS:
+ base = chop_lv2_prefix(i.srcpath())
+ bld.install_files('${DOCDIR}/' + i.srcpath(),
+ bld.path.get_bld().ant_glob(base + '/*.html'))
+
index_files.sort()
bld.add_group() # Barrier (wait for lv2specgen to build index)
@@ -357,6 +374,11 @@ def build(bld):
source = ['lv2/lv2plug.in/ns/index.html.in'] + index_files,
target = 'ns/index.html')
+ # Install main documentation files
+ if not bld.env.ONLINE_DOCS:
+ bld.install_files('${DOCDIR}/lv2/lv2plug.in/aux/', 'aux/style.css')
+ bld.install_files('${DOCDIR}/lv2/lv2plug.in/ns/', 'ns/index.html')
+
if bld.env.BUILD_TESTS:
# Generate a compile test .c file that includes all headers
def gen_build_test(task):