Merge pull request #183 from kernigh/kernigh-include
[ack.git] / build.lua
1 vars.cflags = {
2         "$(CFLAGS)"
3 }
4 vars.ackcflags = {
5         "-O6"
6 }
7 vars.ackldflags = {}
8 vars.plats = {
9         "cpm",
10         "linux386",
11         "linux68k",
12         "linuxppc",
13         "linuxmips",
14         "osx386",
15         "osxppc",
16         "pc86",
17         "rpi",
18         "pdpv7",
19         "em22",
20 }
21 vars.plats_with_tests = {
22         "cpm",
23         "linux68k",
24         "linux386",
25         "linuxppc",
26         "linuxmips",
27         "pc86",
28 }
29
30 local plat_packages = {}
31 local test_packages = {}
32 for _, p in ipairs(vars.plats) do
33         plat_packages[#plat_packages+1] = "plat/"..p.."+pkg"
34 end
35 for _, p in ipairs(vars.plats_with_tests) do
36         test_packages[#test_packages+1] = "plat/"..p.."/tests+tests"
37 end
38
39 installable {
40         name = "ack",
41         map = {
42                 "lang/basic/src+pkg",
43                 "lang/cem/cemcom.ansi+pkg",
44                 "lang/m2/comp+pkg",
45                 "lang/pc/comp+pkg",
46                 "lang/b/compiler+pkg",
47                 "util/ack+pkg",
48                 "util/amisc+pkg",
49                 "util/arch+pkg",
50                 "util/ass+pkg",
51                 "util/ego+pkg",
52                 "util/int+pkg",
53                 "util/led+pkg",
54                 "util/misc+pkg",
55                 "util/opt+pkg",
56                 "examples+pkg",
57                 plat_packages
58         },
59 }
60
61 normalrule {
62         name = "tests",
63         ins = {
64                 "first/testsummary.sh",
65                 test_packages
66         },
67         outleaves = {
68                 "stamp"
69         },
70         commands = {
71                 "%{ins}"
72         }
73 }