aboutsummaryrefslogtreecommitdiff
path: root/build.conf
blob: d05ef3f0804253f1446b9795b7a7f09bf1761645 (plain)
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
# build.conf for build, kind of whacky, eh?

default action: check "build", check "cleanup"

set "CXXFLAGS" += "-ggdb"

["build", "cleanup"]:
	rule "exe",
	target file,
	set "CXXFLAGS" = "-lBob",
	input [filesIn("src/{target}"), filesIn("src/shared")]

[directoriesIn("src/tests")] filter regexp("src/tests/(.*)", "tests/{re:1}"):
	rule "exe",
	target prefix "tests/",
	target file,
	input filesIn("src/tests/{target}")

[directoriesIn("src/tests"), "aoeua"]:
	rule "exe",
	target file,
	input filesIn("src/{target}")

"build":
	input [filesIn("src"), "boy.cpp"] filter regexp(".*\\.cpp$"),
	input filter regexp(".*\\.cpp$"),
	requires ["bob.cpp", "libbuild.a", "libbu++/libbu++.a"]

"bob.cpp": set "aoeu" = "food", requires "bob.bastard"

rule "exe":
	matches regexp("(.*)\\.o$"),
	input filter toString(),
	perform command("stuff")

rule "cpp":
	matches regexp("(.*)\\.cpp$"),
	produces "{re:1}.o",
	requires commandToList("make", "g++ -M {match}"),
	perform command("stuff")