4.115
Last change
on this file since 11e1a6f was
3a71759,
checked in by Amar Takhar <amar@…>, on 01/18/16 at 05:05:50
|
Rework how conf.py is handled.
Needed to switch due to increasing complexity.
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | from sys import path |
---|
2 | from os.path import abspath, exists |
---|
3 | path.append(abspath('../common/')) |
---|
4 | |
---|
5 | from waf import cmd_configure_path, cmd_build_path, cmd_options_path |
---|
6 | |
---|
7 | |
---|
8 | def options(ctx): |
---|
9 | cmd_options_path(ctx) |
---|
10 | |
---|
11 | def configure(ctx): |
---|
12 | cmd_configure_path(ctx) |
---|
13 | |
---|
14 | def build(ctx): |
---|
15 | dirs = [ |
---|
16 | "user", |
---|
17 | "rtemsconfig", |
---|
18 | "shell", |
---|
19 | "ada_user", |
---|
20 | "bsp_howto", |
---|
21 | "c_user", |
---|
22 | "cpu_supplement", |
---|
23 | "develenv", |
---|
24 | "filesystem", |
---|
25 | "networking", |
---|
26 | "porting", |
---|
27 | "posix1003_1", |
---|
28 | "posix_users", |
---|
29 | ] |
---|
30 | |
---|
31 | p = ctx.path.parent.abspath() |
---|
32 | for dir in dirs: |
---|
33 | if not exists("%s/%s" % (p, dir)): |
---|
34 | ctx.fatal("Directory does not exist: %s/%s" % (p, dir)) |
---|
35 | |
---|
36 | for dir in dirs: |
---|
37 | files = ctx.path.parent.find_node(dir).ant_glob("**/*.rst") |
---|
38 | files += ctx.path.parent.find_node(dir).ant_glob("**/*.jpg") |
---|
39 | files += ctx.path.parent.find_node(dir).ant_glob("**/*.png") |
---|
40 | files = [x for x in files if x.name.find("/build/") == -1] |
---|
41 | ctx.path.get_bld().make_node(dir).mkdir() # dirs |
---|
42 | |
---|
43 | ctx( |
---|
44 | features = "subst", |
---|
45 | is_copy = True, |
---|
46 | source = files, |
---|
47 | target = [x.abspath().replace(ctx.srcnode.parent.abspath(), "") for x in files] |
---|
48 | ) |
---|
49 | |
---|
50 | |
---|
51 | ctx( |
---|
52 | features = "subst", |
---|
53 | is_copy = True, |
---|
54 | source = ctx.srcnode.find_node("index_book.rst"), |
---|
55 | target = ["index.rst"] |
---|
56 | ) |
---|
57 | |
---|
58 | |
---|
59 | sub = { |
---|
60 | "VERSION": "1.0", |
---|
61 | "RELEASE": "5.0.0", |
---|
62 | "DOC": "Manual", |
---|
63 | "FILE_DOC": "rtemsmanual", |
---|
64 | "CONF_EXTRA": "sys.path.append('%s')" % ctx.env.RTEMS_PATH |
---|
65 | } |
---|
66 | |
---|
67 | cmd_build_path(ctx) |
---|
Note: See
TracBrowser
for help on using the repository browser.