aboutsummaryrefslogtreecommitdiff
path: root/build.conf
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--build.conf48
1 files changed, 20 insertions, 28 deletions
diff --git a/build.conf b/build.conf
index 4d2e61b..6a1b611 100644
--- a/build.conf
+++ b/build.conf
@@ -1,43 +1,35 @@
1# build.conf for build, kind of whacky, eh? 1# build.conf for build, kind of whacky, eh?
2 2
3default action: check "build", check "cleanup" 3default action: check "build"
4"clean" action: clean ["build", "cleanup"] 4"clean" action: clean "build"
5"rebuild" action: clean "build", check "build"
5 6
6set "CXXFLAGS" += "-ggdb" 7set "CXXFLAGS" += "-ggdb"
7 8
8["build", "cleanup"]: 9"build":
9 rule "exe",
10 target file,
11 set "CXXFLAGS" = "-lBob",
12 input [filesIn("src/{target}"), filesIn("src/shared")]
13
14[directoriesIn("src/tests")] filter regexp("src/tests/(.*)", "tests/{re:1}"):
15 rule "exe",
16 target prefix "tests/",
17 target file,
18 input filesIn("src/tests/{target}")
19
20[directoriesIn("src/tests"), "aoeua"]:
21 rule "exe", 10 rule "exe",
22 target file, 11 target file,
23 input filesIn("src/{target}") 12 requires "libbu++/libbu++.a",
24 13 set "CXXFLAGS" += "-Ilibbu++/src",
25"build": 14 input filesIn("src")
26 input [filesIn("src"), "boy.cpp"] filter regexp(".*\\.cpp$"),
27 input filter regexp(".*\\.cpp$"),
28 requires ["bob.cpp", "libbuild.a", "libbu++/libbu++.a"]
29
30"bob.cpp": set "aoeu" = "food", requires "bob.bastard"
31 15
32rule "exe": 16rule "exe":
33 matches regexp("(.*)\\.o$"), 17 matches regexp("(.*)\\.o$"),
34 input filter toString(), 18 input filter toString(),
35 perform command("stuff") 19 perform command("g++ {LDFLAGS} -o {target} {match}")
36 20
37rule "cpp": 21rule "cpp":
38 matches regexp("(.*)\\.cpp$"), 22 matches regexp("(.*)\\.cpp$"),
39 produces "{re:1}.o", 23 produces "{re:1}.o",
40 requires commandToList("make", "g++ -M {match}"), 24 requires commandToList("g++ -M {match}", "make"),
41 perform command("stuff") 25 perform command("g++ {CXXFLAGS} -c -o {target} {match}")
42 26
43 27rule "bison":
28 matches regexp("(.*)\\.y$"),
29 produces ["{re:1}.tab.c", "{re:1}.tab.h", "{re:1}.output"],
30 perform command("bison -v -b{re:1} {match}")
31
32rule "flex":
33 matches regexp("(.*)\\.l$"),
34 produces "{re:1}.yy.c",
35 perform command("flex --bison-bridge --bison-locations -o {target} {match}")