mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
31 lines
1.1 KiB
Python
31 lines
1.1 KiB
Python
#
|
|
# Waf build script to build the Source Builder Documentation.
|
|
#
|
|
|
|
import os.path
|
|
|
|
version = "1.0.0"
|
|
|
|
asciidoc = os.path.join(os.getcwd(),
|
|
'..', 'source-builder', 'sb', 'asciidoc')
|
|
|
|
def configure(ctx):
|
|
ctx.env.ASCIIDOC = ctx.find_program(['asciidoc.py'],
|
|
path_list = [asciidoc],
|
|
mandatory = True)
|
|
ctx.env.ASCIIDOC_FLAGS = ['-b', 'html5', '-a', 'data-uri',
|
|
'-a', 'icons', '-a', 'max-width=55em-a']
|
|
|
|
def build(ctx):
|
|
ctx(target = 'source-builder.html', source = 'source-builder.txt')
|
|
ctx.add_manual_dependency(ctx.path.find_node('source-builder.txt'),
|
|
ctx.path.find_node('host-results.csv'))
|
|
|
|
import waflib.TaskGen
|
|
waflib.TaskGen.declare_chain(name = 'html',
|
|
rule = '${ASCIIDOC} ${ASCIIDOC_FLAGS} -o ${TGT} ${SRC}',
|
|
shell = False,
|
|
ext_in = '.txt',
|
|
ext_out = '.html',
|
|
reentrant = False)
|