diff options
Diffstat (limited to '')
| -rw-r--r-- | build.conf | 48 | 
1 files changed, 20 insertions, 28 deletions
| @@ -1,43 +1,35 @@ | |||
| 1 | # build.conf for build, kind of whacky, eh? | 1 | # build.conf for build, kind of whacky, eh? | 
| 2 | 2 | ||
| 3 | default action: check "build", check "cleanup" | 3 | default action: check "build" | 
| 4 | "clean" action: clean ["build", "cleanup"] | 4 | "clean" action: clean "build" | 
| 5 | "rebuild" action: clean "build", check "build" | ||
| 5 | 6 | ||
| 6 | set "CXXFLAGS" += "-ggdb" | 7 | set "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 | ||
| 32 | rule "exe": | 16 | rule "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 | ||
| 37 | rule "cpp": | 21 | rule "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 | 27 | rule "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 | |||
| 32 | rule "flex": | ||
| 33 | matches regexp("(.*)\\.l$"), | ||
| 34 | produces "{re:1}.yy.c", | ||
| 35 | perform command("flex --bison-bridge --bison-locations -o {target} {match}") | ||
