-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathbuild.py
60 lines (54 loc) · 1.33 KB
/
build.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
from build.ab import export
from build.config import IS_WINDOWS
import os
from os.path import *
from glob import glob
_plats = os.getenv("PLATS")
if _plats == "all":
PLATS = {dirname(p) for p in glob("*/build.py", root_dir="plat")}
else:
PLATS = _plats.split(" ")
if IS_WINDOWS and ("cpm" in PLATS):
print("Warning: the cpm plat can't be built on Windows because of reasons; skipping.")
PLATS.discard("cpm")
print("Building plats: " + (" ".join(PLATS)))
# This is the list of which plats to test.
TEST_PLATS = [
"cpm",
"linux68k",
"linuxppc",
"pc86",
]
# This contains the platform-independent host tooling required to build the plats.
export(
name="common",
deps=[
"lang/cem/cemcom.ansi+all",
"lang/cem/cpp.ansi+all",
"lang/basic/src+all",
"lang/m2/comp+all",
"lang/pc/comp+all",
"util/ack+all",
"util/amisc+all",
"util/arch+all",
"util/ego+all",
"util/led+all",
"util/misc+all",
"util/opt+all",
],
)
export(
name="compiler",
deps=([".+common"] + [f"plat/{p}+all" for p in PLATS]),
)
export(
name="all",
deps=(
[".+compiler", "examples+all"]
+ (
[]
if IS_WINDOWS
else [f"plat/{p}/tests" for p in TEST_PLATS if p in PLATS]
)
),
)