diff options
Diffstat (limited to 'build.conf')
-rw-r--r-- | build.conf | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -49,7 +49,7 @@ filesIn("src/tests") filter regexp("^src/tests/(.*)\\.cpp$", "tests/{re:1}"): | |||
49 | "tests/itoheap"]: | 49 | "tests/itoheap"]: |
50 | set "LDFLAGS" += "-lpthread" | 50 | set "LDFLAGS" += "-lpthread" |
51 | 51 | ||
52 | filesIn("src/unit") filter regexp("^src/unit/(.*)\\.cpp$", "unit/{re:1}"): | 52 | filesIn("src/unit") filter regexp("^src/unit/(.*)\\.unit$", "unit/{re:1}"): |
53 | rule "exe", | 53 | rule "exe", |
54 | target file, | 54 | target file, |
55 | group "tests", | 55 | group "tests", |
@@ -57,7 +57,7 @@ filesIn("src/unit") filter regexp("^src/unit/(.*)\\.cpp$", "unit/{re:1}"): | |||
57 | requires "libbu++.a", | 57 | requires "libbu++.a", |
58 | set "CXXFLAGS" += "-I.", | 58 | set "CXXFLAGS" += "-I.", |
59 | set "LDFLAGS" += "-L. -lbu++", | 59 | set "LDFLAGS" += "-L. -lbu++", |
60 | input "src/{target}.cpp" | 60 | input "src/{target}.unit" |
61 | 61 | ||
62 | "tests/plugin": set "LDFLAGS" += "-ldl" | 62 | "tests/plugin": set "LDFLAGS" += "-ldl" |
63 | 63 | ||
@@ -79,6 +79,12 @@ rule "cpp": | |||
79 | requires commandToList("g++ -M {CXXFLAGS} {match}", "make"), | 79 | requires commandToList("g++ -M {CXXFLAGS} {match}", "make"), |
80 | perform command("g++ {CXXFLAGS} -c -o {target} {match}") | 80 | perform command("g++ {CXXFLAGS} -c -o {target} {match}") |
81 | 81 | ||
82 | rule "unit": | ||
83 | matches regexp("(.*)\\.unit$"), | ||
84 | produces "{re:1}.cpp", | ||
85 | requires "mkunit.sh", | ||
86 | perform command("./mkunit.sh \"{match}\" \"{target}\"") | ||
87 | |||
82 | rule "hln": | 88 | rule "hln": |
83 | matches regexp("src/(.*)\\.h"), | 89 | matches regexp("src/(.*)\\.h"), |
84 | produces "bu/{re:1}.h", | 90 | produces "bu/{re:1}.h", |