Changeset 2804294 in rtems-docs


Ignore:
Timestamp:
Oct 13, 2017, 12:47:23 AM (21 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
4401dc5
Parents:
8e8094a
git-author:
Chris Johns <chrisj@…> (10/13/17 00:47:23)
git-committer:
Joel Sherrill <joel@…> (10/13/17 01:25:26)
Message:

posix-compliance: Add automatic generation of the ReST file from CSV data.

Closes #3177.

Location:
posix-compliance
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • posix-compliance/wscript

    r8e8094a r2804294  
    44
    55from waf import cmd_configure as configure
    6 from waf import cmd_build as build
     6from waf import cmd_build as doc_build
    77from waf import cmd_options as options
    88from waf import spell
     
    1010from waf import linkcheck
    1111from waf import cmd_linkcheck
     12
     13import posix_rst
     14
     15def gen_posix_rst(task):
     16    c = posix_rst.compliance()
     17    c.load(task.inputs[1].abspath())
     18    s = ['']
     19    for standard in posix_rst.standards:
     20        s += ['',
     21              posix_rst.standard_names[standard],
     22              '*' * len(posix_rst.standard_names[standard]),
     23               ''] + c.output(standard)
     24    with open(task.outputs[0].abspath(), 'w') as w:
     25        from os import linesep
     26        w.write(linesep.join(s))
     27
     28def build(ctx):
     29    ctx(rule = gen_posix_rst,
     30        source = ['posix_rst.py', 'RTEMS-Standards-Compliance-v1.csv'],
     31        target = 'generated-posix-compliance.rst')
     32    ctx.add_group()
     33    doc_build(ctx, extra_source = ['generated-posix-compliance.rst'])
Note: See TracChangeset for help on using the changeset viewer.