-
Notifications
You must be signed in to change notification settings - Fork 64
/
build.lua
110 lines (103 loc) · 1.49 KB
/
build.lua
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
vars.cflags = {
"$(CFLAGS)"
}
vars.ackcflags = {
"-O6"
}
vars.ackldflags = {}
vars.plats = {
"cpm",
"linux386",
"linux68k",
"linuxppc",
"linuxmips",
"msdos86",
"msdos386",
"osx386",
"osxppc",
"pc86",
"rpi",
"pdpv7",
"em22",
}
vars.plats_with_tests = {
"cpm",
"linux68k",
--"linux386",
"linuxppc",
--"linuxmips",
"pc86",
}
local is_windows = os.getenv("OS") == "Windows_NT"
local int = {}
if not is_windows then
int[#int+1] = "util/int+pkg"
end
installable {
name = "ack-common",
map = {
"lang/basic/src+pkg",
"lang/cem/cemcom.ansi+pkg",
"lang/m2/comp+pkg",
"lang/pc/comp+pkg",
"util/ack+pkg",
"util/amisc+pkg",
"util/arch+pkg",
"util/ass+pkg",
"util/ego+pkg",
"util/led+pkg",
"util/misc+pkg",
"util/opt+pkg",
int
},
}
local plat_packages = {}
local test_packages = {}
for _, p in ipairs(vars.plats) do
local pkg = "plat/"..p.."+pkg"
plat_packages[#plat_packages+1] = pkg
installable {
name = "ack-"..p,
map = {
"+ack-common",
pkg,
},
}
end
for _, p in ipairs(vars.plats_with_tests) do
test_packages[#test_packages+1] = "plat/"..p.."/tests+tests"
end
installable {
name = "ack",
map = {
"+ack-common",
"examples+pkg",
plat_packages
},
}
if not is_windows then
normalrule {
name = "tests",
ins = {
"first/testsummary.sh",
test_packages
},
outleaves = {
"stamp"
},
commands = {
"%{ins}"
}
}
else
normalrule {
name = "tests",
ins = {},
outleaves = {
"stamp"
},
commands = {
"touch %{outs}"
}
}
end