From 4a603a28de272c818100185ffbc8693585d7be9f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 31 Dec 2012 23:10:27 +0000 Subject: Generate book from example plugin source. --- wscript | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'wscript') diff --git a/wscript b/wscript index 74d76b0..94062d7 100644 --- a/wscript +++ b/wscript @@ -55,6 +55,13 @@ def configure(conf): conf.env.COPY_HEADERS = Options.options.copy_headers conf.env.ONLINE_DOCS = Options.options.online_docs + if conf.env.DOCS or conf.env.ONLINE_DOCS: + try: + conf.find_program('asciidoc') + conf.env.BUILD_BOOK = True + except: + Logs.warn('Asciidoc not found, book will not be built') + # Check for gcov library (for test coverage) if conf.env.BUILD_TESTS and not conf.is_defined('HAVE_GCOV'): conf.check_cc(lib='gcov', define_name='HAVE_GCOV', mandatory=False) @@ -65,7 +72,7 @@ def configure(conf): conf.env.LV2_BUILD = ['lv2/lv2plug.in/ns/lv2core'] if conf.env.BUILD_PLUGINS: - for i in conf.path.ant_glob('plugins/*', dir=True): + for i in conf.path.ant_glob('plugins/*', src=False, dir=True): try: conf.recurse(i.srcpath()) conf.env.LV2_BUILD += [i.srcpath()] @@ -308,6 +315,9 @@ def build(bld): for i in bld.env.LV2_BUILD: bld.recurse(i) + if bld.env.BUILD_BOOK: + bld.recurse('plugins') + if bld.env.DOCS or bld.env.ONLINE_DOCS: # Build Doxygen documentation (and tags file) autowaf.build_dox(bld, 'LV2', VERSION, top, out, 'lv2plug.in/doc') -- cgit v1.2.1