From 4a603a28de272c818100185ffbc8693585d7be9f Mon Sep 17 00:00:00 2001
From: David Robillard <d@drobilla.net>
Date: Mon, 31 Dec 2012 23:10:27 +0000
Subject: Generate book from example plugin source.

---
 plugins/wscript | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 plugins/wscript

(limited to 'plugins/wscript')

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')
+    
-- 
cgit v1.2.1