diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-12-20 07:30:42 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-12-20 07:30:42 +0000 |
commit | 5399dd17a944464ced0c8618c46a367e4188d29b (patch) | |
tree | 3d2a42f5cab172dbe719c7ff7953017119cf8f53 /default.bld | |
parent | 56ced4bcccf3d361ff9768e78d8118faeb75269a (diff) | |
download | libbu++-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.
Diffstat (limited to 'default.bld')
-rw-r--r-- | default.bld | 64 |
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 | ||
3 | CXXFLAGS += "-ggdb -W -Wall"; | 7 | CXXFLAGS += "-ggdb -W -Wall"; |
4 | 8 | ||
5 | action "default" | 9 | action "default" |
6 | { | 10 | { |
7 | build: [targets("header-links"), "libbu++.a"]; | 11 | build: [targets("header-links"), "libbu++.a", targets("tools")]; |
8 | } | 12 | } |
9 | 13 | ||
10 | action "pkg" | 14 | action "pkg" |
@@ -14,7 +18,8 @@ action "pkg" | |||
14 | 18 | ||
15 | action "all" | 19 | action "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 | ||
20 | target files("src/*.h").replace("src/", "bu/") | 25 | target 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 | |||
47 | target 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 | ||
42 | target files("src/tests/*.cpp").replace("src/","").replace(".cpp","") | 60 | target 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 | ||
76 | target ["tests/itoserver", "tests/socketblock", "tests/itoheap", | ||
77 | "tests/itoqueue1", "tests/itoqueue2"] | ||
78 | { | ||
79 | LDFLAGS += "-lpthread"; | ||
80 | } | ||
81 | |||
82 | // | ||
83 | // Unit tests | ||
84 | // | ||
85 | |||
86 | target 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 | |||
58 | target "libbu++-r$(svnversion "-n").tar.bz2" | 95 | target "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 | ||
82 | rule "tarball" | 119 | rule "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 | ||
131 | rule "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 | |||