source: rtems-docs/wscript @ 2c3cf21

5
Last change on this file since 2c3cf21 was 2c3cf21, checked in by Joel Sherrill <joel@…>, on 08/28/17 at 18:03:40

New version of POSIX Compliance Guide

This is a replacement of the POSIX 1003.1 Compliance Guide. It
will be generated from a .csv file.

Updates #3177.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1#
2# RTEMS Project Documentation
3#
4
5from sys import path
6from os.path import abspath
7path.append(abspath('common'))
8
9import waflib
10import waf as docs_waf
11
12version = '4.11.99 (master)'
13
14build_all = ['user',
15             'rsb',
16             'c-user',
17             'bsp-howto',
18             'posix-users',
19             'posix-compliance',
20             'filesystem',
21             'networking',
22             'shell',
23             'cpu-supplement',
24             'develenv',
25             'eclipse']
26
27building = build_all
28
29def options(opt):
30    docs_waf.cmd_options(opt)
31
32def configure(conf):
33    conf.env.VERSION = version
34    for b in building:
35        conf.recurse(b)
36    conf.env['BUILD_FROM_TOP'] = 'yes'
37
38def catalogue(ctx):
39    docs_waf.xml_catalogue(ctx, building)
40
41def coverpage_js(ctx):
42    js = None
43    xml = None
44    for f in ctx.inputs:
45        if f.abspath().endswith('.js'):
46            with open(f.abspath()) as i:
47                js = i.read()
48        elif f.abspath().endswith('.xml'):
49            with open(f.abspath()) as i:
50                xml = i.read()
51    xml = xml.replace('\n', ' \\\n');
52    with open(ctx.outputs[0].abspath(), 'w') as o:
53        o.write(js.replace('@CATALOGUE', xml))
54
55def build(ctx):
56    for b in building:
57        ctx.recurse(b)
58
59    #
60    # Build the catalogue, coverpage.js and install.
61    #
62    ctx(rule = catalogue,
63        target = 'catalogue.xml',
64        source = ['wscript', 'common/waf.py'] + ['%s/conf.py' % x for x in building])
65    ctx.install_files('${PREFIX}', 'catalogue.xml')
66    ctx(rule = coverpage_js,
67        target = 'coverpage.js',
68        source = ['wscript', 'catalogue.xml', 'common/coverpage/coverpage.js'])
69    ctx.install_as('${PREFIX}/coverpage.js', 'coverpage.js')
70    #
71    # Install the static content.
72    #
73    ctx.install_as('${PREFIX}/index.html', 'common/coverpage/coverpage.html')
74    static_dir = ctx.path.find_dir('common/coverpage/static')
75    ctx.install_files('${PREFIX}/static',
76                      static_dir.ant_glob('**'),
77                      cwd = static_dir,
78                      relative_trick = True)
79
80def install(ctx):
81    for b in building:
82        ctx.recurse(b)
83
84def cmd_spell(ctx):
85    for b in building:
86        ctx.recurse(b)
87
88def cmd_linkcheck(ctx):
89    for b in building:
90        ctx.recurse(b)
Note: See TracBrowser for help on using the repository browser.