summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-12-20 07:30:42 +0000
committerMike Buland <eichlan@xagasoft.com>2009-12-20 07:30:42 +0000
commit5399dd17a944464ced0c8618c46a367e4188d29b (patch)
tree3d2a42f5cab172dbe719c7ff7953017119cf8f53
parent56ced4bcccf3d361ff9768e78d8118faeb75269a (diff)
downloadlibbu++-5399dd17a944464ced0c8618c46a367e4188d29b.tar.gz
libbu++-5399dd17a944464ced0c8618c46a367e4188d29b.tar.bz2
libbu++-5399dd17a944464ced0c8618c46a367e4188d29b.tar.xz
libbu++-5399dd17a944464ced0c8618c46a367e4188d29b.zip
Sweet, build-m3 can totally replace build m2 as far as libbu++ is concerned,
it does everything the old one did and more.
-rw-r--r--default.bld64
1 files changed, 56 insertions, 8 deletions
diff --git a/default.bld b/default.bld
index 8302fc6..d3cf06b 100644
--- a/default.bld
+++ b/default.bld
@@ -1,10 +1,14 @@
1# vim: syntax=build 1/**
2 * This is the default.bld file for libbu++, it pretty much handles everything
3 * libbu++ related, kinda' cool, eh? It can completely replace the old build
4 * and actually does a better job with a number of things.
5 */
2 6
3CXXFLAGS += "-ggdb -W -Wall"; 7CXXFLAGS += "-ggdb -W -Wall";
4 8
5action "default" 9action "default"
6{ 10{
7 build: [targets("header-links"), "libbu++.a"]; 11 build: [targets("header-links"), "libbu++.a", targets("tools")];
8} 12}
9 13
10action "pkg" 14action "pkg"
@@ -14,7 +18,8 @@ action "pkg"
14 18
15action "all" 19action "all"
16{ 20{
17 build: [targets("header-links"), "libbu++.a", targets("tests")]; 21 build: [targets("header-links"), "libbu++.a", targets("tools"),
22 targets("tests")];
18} 23}
19 24
20target files("src/*.h").replace("src/", "bu/") 25target files("src/*.h").replace("src/", "bu/")
@@ -36,14 +41,27 @@ target "libbu++.a"
36} 41}
37 42
38// 43//
39// Tests 44// Tools
45//
46
47target files("src/tools/*.cpp").replace("src/tools/","").replace(".cpp","")
48{
49 input "src/tools/${OUTPUT}.cpp";
50 rule "exe";
51 tag "tools";
52 CXXFLAGS += "-I.";
53 LDFLAGS += "-L. -lbu++";
54}
55
56//
57// General Tests
40// 58//
41 59
42target files("src/tests/*.cpp").replace("src/","").replace(".cpp","") 60target files("src/tests/*.cpp").replace("src/","").replace(".cpp","")
43{ 61{
44 input "src/${OUTPUT}.cpp"; 62 input "src/${OUTPUT}.cpp";
45 rule "exe"; 63 rule "exe";
46 tag "tests"; 64 tag ["tests", "general tests"];
47 CXXFLAGS += "-I."; 65 CXXFLAGS += "-I.";
48 LDFLAGS += "-L. -lbu++"; 66 LDFLAGS += "-L. -lbu++";
49} 67}
@@ -55,13 +73,32 @@ target "tests/bzip2"
55 LDFLAGS += "-lbz2"; 73 LDFLAGS += "-lbz2";
56} 74}
57 75
76target ["tests/itoserver", "tests/socketblock", "tests/itoheap",
77 "tests/itoqueue1", "tests/itoqueue2"]
78{
79 LDFLAGS += "-lpthread";
80}
81
82//
83// Unit tests
84//
85
86target files("src/unit/*.unit").replace("src/","").replace(".unit","")
87{
88 input "src/${OUTPUT}.unit";
89 rule "exe";
90 tag ["tests", "unit tests"];
91 CXXFLAGS += "-I.";
92 LDFLAGS += "-L. -lbu++";
93}
94
58target "libbu++-r$(svnversion "-n").tar.bz2" 95target "libbu++-r$(svnversion "-n").tar.bz2"
59{ 96{
60 input [ 97 input [
61 "LICENSE", 98 "LICENSE",
62 "build.conf", 99 "build.conf",
63 "Doxyfile", 100 "Doxyfile",
64 "buildm3.conf", 101 "default.bld",
65 "support/vim/syntax/taf.vim", 102 "support/vim/syntax/taf.vim",
66 "support/vim/ftdetect/taf.vim", 103 "support/vim/ftdetect/taf.vim",
67 "support/vim/ftplugin/taf.vim", 104 "support/vim/ftplugin/taf.vim",
@@ -81,8 +118,8 @@ target "libbu++-r$(svnversion "-n").tar.bz2"
81 118
82rule "tarball" 119rule "tarball"
83{ 120{
84 input matches("LICENSE", "*.cpp", "*.h", "*.conf", "Doxyfile", "*.vim", 121 input matches("LICENSE", "*.cpp", "*.h", "*.conf", "*.bld", "Doxyfile",
85 "*.sh"); 122 "*.vim", "*.sh");
86 profile "build" 123 profile "build"
87 { 124 {
88 OUTDIR = OUTPUT.replace(".tar.bz2",""); 125 OUTDIR = OUTPUT.replace(".tar.bz2","");
@@ -91,3 +128,14 @@ rule "tarball"
91 } 128 }
92} 129}
93 130
131rule "unit"
132{
133 input "*.unit";
134 output INPUT.replace(".unit", ".cpp");
135
136 profile "build"
137 {
138 execute("./mkunit.sh \"${INPUT}\" \"${OUTPUT}\"");
139 }
140}
141