summaryrefslogtreecommitdiffstats
path: root/posix-compliance/wscript
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-10-12 17:47:23 -0700
committerJoel Sherrill <joel@rtems.org>2017-10-12 20:25:26 -0500
commit2804294c6c1858553cff6f7b355fe8a5ba9a7259 (patch)
tree7f61249fc845889f881d561201bed6d35e4b1ed1 /posix-compliance/wscript
parent8e8094abc8a6c0bf32a927b702cfbddf701d562c (diff)
downloadrtems-docs-2804294c6c1858553cff6f7b355fe8a5ba9a7259.tar.bz2
posix-compliance: Add automatic generation of the ReST file from CSV data.
Closes #3177.
Diffstat (limited to 'posix-compliance/wscript')
-rw-r--r--posix-compliance/wscript24
1 files changed, 23 insertions, 1 deletions
diff --git a/posix-compliance/wscript b/posix-compliance/wscript
index 26ab0ca..080a7b1 100644
--- a/posix-compliance/wscript
+++ b/posix-compliance/wscript
@@ -3,9 +3,31 @@ from os.path import abspath
path.append(abspath('../common/'))
from waf import cmd_configure as configure
-from waf import cmd_build as build
+from waf import cmd_build as doc_build
from waf import cmd_options as options
from waf import spell
from waf import cmd_spell
from waf import linkcheck
from waf import cmd_linkcheck
+
+import posix_rst
+
+def gen_posix_rst(task):
+ c = posix_rst.compliance()
+ c.load(task.inputs[1].abspath())
+ s = ['']
+ for standard in posix_rst.standards:
+ s += ['',
+ posix_rst.standard_names[standard],
+ '*' * len(posix_rst.standard_names[standard]),
+ ''] + c.output(standard)
+ with open(task.outputs[0].abspath(), 'w') as w:
+ from os import linesep
+ w.write(linesep.join(s))
+
+def build(ctx):
+ ctx(rule = gen_posix_rst,
+ source = ['posix_rst.py', 'RTEMS-Standards-Compliance-v1.csv'],
+ target = 'generated-posix-compliance.rst')
+ ctx.add_group()
+ doc_build(ctx, extra_source = ['generated-posix-compliance.rst'])