wscript: add docbook-to-man rules
authorPaul Brossier <piem@piem.org>
Mon, 16 Sep 2013 23:25:33 +0000 (18:25 -0500)
committerPaul Brossier <piem@piem.org>
Mon, 30 Sep 2013 15:18:48 +0000 (18:18 +0300)
wscript

diff --git a/wscript b/wscript
index 8be9e67..0645cd9 100644 (file)
--- a/wscript
+++ b/wscript
@@ -186,9 +186,14 @@ def build(bld):
     aubiopc.target = 'aubio.pc'
     aubiopc.install_path = '${PREFIX}/lib/pkgconfig'
 
+  # install woodblock sound
+  bld.install_files('${PREFIX}/share/sounds/aubio/',
+      'sounds/woodblock.aiff')
+  """
+
   # build manpages from sgml files
-  if ctx.env['DOCBOOKTOMAN']:
-    import TaskGen
+  if bld.env['DOCBOOKTOMAN']:
+    from waflib import TaskGen
     TaskGen.declare_chain(
         name    = 'docbooktoman',
         rule    = '${DOCBOOKTOMAN} ${SRC} > ${TGT}',
@@ -196,14 +201,10 @@ def build(bld):
         ext_out = '.1',
         reentrant = 0,
     )
-    manpages = ctx.new_task_gen(name = 'docbooktoman',
-        source=ctx.path.ant_glob('doc/*.sgml'))
-    ctx.install_files('${MANDIR}/man1', ctx.path.ant_glob('doc/*.1'))
-
-  # install woodblock sound
-  bld.install_files('${PREFIX}/share/sounds/aubio/',
-      'sounds/woodblock.aiff')
-  """
+    manpages = bld(name = 'docbooktoman',
+            source=bld.path.ant_glob('doc/*.sgml'))
+    bld.install_files('${MANDIR}/man1',
+            bld.path.ant_glob('doc/*.1'))
 
 def shutdown(bld):
     from waflib import Options, Logs