diff options
author | David Robillard <d@drobilla.net> | 2012-12-31 23:10:27 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-12-31 23:10:27 +0000 |
commit | 4a603a28de272c818100185ffbc8693585d7be9f (patch) | |
tree | bf8cbadb49bfefd61776185a3e20b192c2a0c64a /plugins/wscript | |
parent | b09f94596a7361f01b835d811e14269ecec5272a (diff) | |
download | lv2-4a603a28de272c818100185ffbc8693585d7be9f.tar.xz |
Generate book from example plugin source.
Diffstat (limited to 'plugins/wscript')
-rw-r--r-- | plugins/wscript | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/plugins/wscript b/plugins/wscript new file mode 100644 index 0000000..e474c78 --- /dev/null +++ b/plugins/wscript @@ -0,0 +1,37 @@ +#!/usr/bin/env python +import os + +from waflib.extras import autowaf as autowaf +import waflib.Logs as Logs + +import literasc + +def confgure(conf): + pass + +def bld_book_src(task): + filenames = [] + for i in task.inputs: + filenames += [i.abspath()] + + literasc.gen(open(task.outputs[0].abspath(), 'w'), filenames) + + +def build(bld): + files = [bld.path.find_node('README.txt')] + for i in bld.path.ant_glob('*', src=False, dir=True): + for j in bld.path.ant_glob('%s/*.*' % i): + name = j.abspath() + if (name.endswith('.c') or + name.endswith('.txt') or + name.endswith('.ttl.in')): + files += [j] + + bld(rule = bld_book_src, + source = files, + target = 'book.txt') + + bld(rule = 'asciidoc -b html -o ${TGT} ${SRC}', + source = 'book.txt', + target = 'book.html') + |