source: rtems-docs/posix-compliance/wscript @ 1a051fc

Last change on this file since 1a051fc was 1a051fc, checked in by Chris Johns <chrisj@…>, on Feb 20, 2019 at 4:40:37 AM

waf: Add support for extra and excluded sources.

  • Property mode set to 100644
File size: 1.0 KB
Line 
1from common.waf import cmd_configure as configure
2from common.waf import cmd_build as doc_build
3from common.waf import cmd_options as options
4from common.waf import spell
5from common.waf import cmd_spell
6from common.waf import linkcheck
7from common.waf import cmd_linkcheck
8
9import posix_rst
10
11def gen_posix_rst(task):
12    c = posix_rst.compliance()
13    c.load(task.inputs[1].abspath())
14    s = ['']
15    for standard in posix_rst.standards:
16        s += ['.. comment SPDX-License-Identifier: CC-BY-SA-4.0',
17              '',
18              posix_rst.standard_names[standard],
19              '*' * len(posix_rst.standard_names[standard]),
20               ''] + c.output(standard)
21    with open(task.outputs[0].abspath(), 'w') as w:
22        from os import linesep
23        w.write(linesep.join(s))
24
25def build(ctx):
26    ctx(rule = gen_posix_rst,
27        source = ['posix_rst.py', 'RTEMS-Standards-Compliance-v4a.csv'],
28        target = 'generated-posix-compliance.rst')
29    sources = { 'extra' : ['generated-posix-compliance.rst'] }
30    doc_build(ctx, sources = sources)
Note: See TracBrowser for help on using the repository browser.