diff options
Diffstat (limited to 'build.conf')
-rw-r--r-- | build.conf | 47 |
1 files changed, 29 insertions, 18 deletions
@@ -1,27 +1,38 @@ | |||
1 | # This is a build file for build | 1 | default action: check "build", check "cleanup" |
2 | 2 | ||
3 | default action: check build | 3 | ["build", "cleanup"]: |
4 | "clean" action: clean build | 4 | rule "exe", |
5 | target file, | ||
6 | set "CXXFLAGS" = "-lBob", | ||
7 | input [files("src/{target}"), files("src/shared")] | ||
5 | 8 | ||
6 | create file build from files in src using rule exe | 9 | [directoryName("src/tests")] filter /src\/tests/(.*)/tests\/{re:1}/: |
10 | rule "exe", | ||
11 | target prefix "tests/", | ||
12 | target file, | ||
13 | input files("src/tests/{target}") | ||
7 | 14 | ||
8 | set CXXFLAGS += "-ggdb" | 15 | [directories("src/tests"), aoeua]: |
16 | rule "exe", | ||
17 | target file, | ||
18 | input files("src/{target}") | ||
9 | 19 | ||
10 | set CXXFLAGS += "-Ilibbu++/src" | 20 | "build": |
11 | set LDFLAGS += "-Llibbu++ -lbu++" | 21 | input [files("src"), "boy.cpp"] filter /.*\.cpp$/, |
22 | input filter /.*\.cpp$/, | ||
23 | requires ["bob.cpp", "libbuild.a", "libbu++/libbu++.a"] | ||
12 | 24 | ||
13 | build requires "libbu++/libbu++.a" | 25 | "bob.cpp": set "aoeu" = "food", requires "bob.bastard" |
14 | 26 | ||
15 | /(.*)\.o$/ requires from command "g++ {CXXFLAGS} -M {re:1}.c*" | 27 | rule "exe" |
28 | matches /(.*)\.o$/, | ||
29 | input filter toSpaces(), | ||
30 | perform command("stuff") | ||
16 | 31 | ||
17 | rule exe matches all /(.*)\.o$/ perform command ... | 32 | rule "cpp": |
18 | "g++ {match} {LDFLAGS} -o {target}" | 33 | matches /(.*)\.cpp$/, |
34 | produces "{re:1}.o", | ||
35 | requires commandToList( make, "g++ -M {match}"), | ||
36 | perform command("stuff") | ||
19 | 37 | ||
20 | rule cpp matches one /(.*)\.c(pp)?$/ produces "{re:1}.o" perform command ... | ||
21 | "g++ {CXXFLAGS} -c -o {target} {match}" | ||
22 | 38 | ||
23 | rule bison matches one /(.*)\.y$/ produces "{re:1}.tab.c", "{re:1}.tab.h", ... | ||
24 | "{re:1}.output" perform command "bison -v -b{re:1} {match}" | ||
25 | |||
26 | rule flex matches one /(.*)\.l$/ produces "{re:1}.yy.c" perform ... | ||
27 | command "flex --bison-bridge --bison-locations -o {target} {match}" | ||