aboutsummaryrefslogtreecommitdiff
path: root/default.bld
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-05 22:41:51 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-05 22:41:51 +0000
commitec05778d5718a7912e506764d443a78d6a6179e3 (patch)
tree78a9a01532180030c095acefc45763f07c14edb8 /default.bld
parentb20414ac1fe80a71a90601f4cd1767fa7014a9ba (diff)
downloadlibbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.gz
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.bz2
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.xz
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.zip
Converted tabs to spaces with tabconv.
Diffstat (limited to 'default.bld')
-rw-r--r--default.bld318
1 files changed, 159 insertions, 159 deletions
diff --git a/default.bld b/default.bld
index d46662c..83d2717 100644
--- a/default.bld
+++ b/default.bld
@@ -19,117 +19,117 @@ CXXFLAGS += "-ggdb -W -Wall -I.";
19 19
20action "default" 20action "default"
21{ 21{
22 build: ["header-links", "libbu++.a", 22 build: ["header-links", "libbu++.a",
23 targets("tools")]; 23 targets("tools")];
24} 24}
25 25
26action "pkg" 26action "pkg"
27{ 27{
28 build: targets("pkg"); 28 build: targets("pkg");
29} 29}
30 30
31action "all" 31action "all"
32{ 32{
33 build: ["header-links", "libbu++.a", 33 build: ["header-links", "libbu++.a",
34 targets("tools"), targets("tests")]; 34 targets("tools"), targets("tests")];
35} 35}
36 36
37action "unit" 37action "unit"
38{ 38{
39 build: targets("unit tests"); 39 build: targets("unit tests");
40} 40}
41 41
42action "myriadfs" 42action "myriadfs"
43{ 43{
44 build: "myriadfs"; 44 build: "myriadfs";
45} 45}
46 46
47target ["src/autoconfig.h", "src/version.h"] 47target ["src/autoconfig.h", "src/version.h"]
48{ 48{
49 input "autoconfig"; 49 input "autoconfig";
50 display "autoconfig"; 50 display "autoconfig";
51 profile "build" 51 profile "build"
52 { 52 {
53 execute("./autoconfig ${OUTPUT}"); 53 execute("./autoconfig ${OUTPUT}");
54 } 54 }
55} 55}
56 56
57target "src/version.h" 57target "src/version.h"
58{ 58{
59 input ".svn"; 59 input ".svn";
60} 60}
61 61
62target "src/signals.h" 62target "src/signals.h"
63{ 63{
64 input "gensigs.bld"; 64 input "gensigs.bld";
65 display "generate"; 65 display "generate";
66 profile "build" 66 profile "build"
67 { 67 {
68 genSigs( OUTPUT ); 68 genSigs( OUTPUT );
69 } 69 }
70} 70}
71 71
72target "autoconfig" 72target "autoconfig"
73{ 73{
74 rule "exe"; 74 rule "exe";
75 input "autoconfig.cpp"; 75 input "autoconfig.cpp";
76} 76}
77 77
78for base in ["stable", "unstable", "experimental"] do 78for base in ["stable", "unstable", "experimental"] do
79{ 79{
80 target files("src/${base}/*.h").replace("src/${base}/", "bu/") 80 target files("src/${base}/*.h").replace("src/${base}/", "bu/")
81 { 81 {
82 tag "header-links"; 82 tag "header-links";
83 display "symlink"; 83 display "symlink";
84 input OUTPUT.replace("bu/","src/${base}/"); 84 input OUTPUT.replace("bu/","src/${base}/");
85 profile "build" 85 profile "build"
86 { 86 {
87 DIR = OUTPUT.dirName(); 87 DIR = OUTPUT.dirName();
88 execute("mkdir -p ${DIR}; ln -s ../${INPUT} ${OUTPUT}"); 88 execute("mkdir -p ${DIR}; ln -s ../${INPUT} ${OUTPUT}");
89 } 89 }
90 } 90 }
91} 91}
92 92
93target ["bu/config.h", "bu/autoconfig.h", "bu/version.h", "bu/signals.h"] 93target ["bu/config.h", "bu/autoconfig.h", "bu/version.h", "bu/signals.h"]
94{ 94{
95 tag "header-links"; 95 tag "header-links";
96 display "symlink"; 96 display "symlink";
97 input OUTPUT.replace("bu/","src/"); 97 input OUTPUT.replace("bu/","src/");
98 profile "build" 98 profile "build"
99 { 99 {
100 DIR = OUTPUT.dirName(); 100 DIR = OUTPUT.dirName();
101 execute("mkdir -p ${DIR}; ln -s ../${INPUT} ${OUTPUT}"); 101 execute("mkdir -p ${DIR}; ln -s ../${INPUT} ${OUTPUT}");
102 } 102 }
103} 103}
104 104
105target files("src/compat/*.h").replace("src/", "bu/") 105target files("src/compat/*.h").replace("src/", "bu/")
106{ 106{
107 tag "header-links"; 107 tag "header-links";
108 display "symlink"; 108 display "symlink";
109 input OUTPUT.replace("bu/","src/"); 109 input OUTPUT.replace("bu/","src/");
110 profile "build" 110 profile "build"
111 { 111 {
112 DIR = OUTPUT.dirName(); 112 DIR = OUTPUT.dirName();
113 execute("mkdir -p ${DIR}; ln -s ../../${INPUT} ${OUTPUT}"); 113 execute("mkdir -p ${DIR}; ln -s ../../${INPUT} ${OUTPUT}");
114 } 114 }
115} 115}
116 116
117target "header-links" 117target "header-links"
118{ 118{
119 input targets("header-links"); 119 input targets("header-links");
120 display "symlinks"; 120 display "symlinks";
121 profile "build" 121 profile "build"
122 { 122 {
123 condition always; 123 condition always;
124 } 124 }
125} 125}
126 126
127target "libbu++.a" 127target "libbu++.a"
128{ 128{
129 input files("src/stable/*.cpp", "src/unstable/*.cpp", 129 input files("src/stable/*.cpp", "src/unstable/*.cpp",
130 "src/experimental/*.cpp", "src/compat/*.cpp"); 130 "src/experimental/*.cpp", "src/compat/*.cpp");
131 rule "lib"; 131 rule "lib";
132 CXXFLAGS += "-I. -fPIC"; 132 CXXFLAGS += "-I. -fPIC";
133} 133}
134 134
135// 135//
@@ -138,31 +138,31 @@ target "libbu++.a"
138 138
139target files("src/tools/*.cpp").replace("src/tools/","").replace(".cpp","") 139target files("src/tools/*.cpp").replace("src/tools/","").replace(".cpp","")
140{ 140{
141 input "src/tools/${OUTPUT}.cpp"; 141 input "src/tools/${OUTPUT}.cpp";
142 rule "exe"; 142 rule "exe";
143 requires "libbu++.a"; 143 requires "libbu++.a";
144 tag "tools"; 144 tag "tools";
145 CXXFLAGS += "-I."; 145 CXXFLAGS += "-I.";
146 LDFLAGS += "-L. -lbu++"; 146 LDFLAGS += "-L. -lbu++";
147} 147}
148 148
149target "viewcsv" 149target "viewcsv"
150{ 150{
151 LDFLAGS += "-lncurses"; 151 LDFLAGS += "-lncurses";
152} 152}
153 153
154target ["myriad", "myriadfs", "tests/myriad", "tests/myriadfs", "unit/myriad", "tests/bigmyriad", "tests/synchroqueue"] 154target ["myriad", "myriadfs", "tests/myriad", "tests/myriadfs", "unit/myriad", "tests/bigmyriad", "tests/synchroqueue"]
155{ 155{
156 LDFLAGS += "-lpthread"; 156 LDFLAGS += "-lpthread";
157} 157}
158 158
159target files("src/extra/*.cpp").replace("src/extra/","").replace(".cpp","") 159target files("src/extra/*.cpp").replace("src/extra/","").replace(".cpp","")
160{ 160{
161 input "src/extra/${OUTPUT}.cpp"; 161 input "src/extra/${OUTPUT}.cpp";
162 rule "exe"; 162 rule "exe";
163 requires "libbu++.a"; 163 requires "libbu++.a";
164 CXXFLAGS += "-I."; 164 CXXFLAGS += "-I.";
165 LDFLAGS += "-L. -lbu++"; 165 LDFLAGS += "-L. -lbu++";
166} 166}
167 167
168// 168//
@@ -173,17 +173,17 @@ target files("src/extra/*.cpp").replace("src/extra/","").replace(".cpp","")
173// 173//
174target "src/extra/myriadfs.o" 174target "src/extra/myriadfs.o"
175{ 175{
176 CXXFLAGS += "-D_FILE_OFFSET_BITS=64"; 176 CXXFLAGS += "-D_FILE_OFFSET_BITS=64";
177} 177}
178 178
179target "myriadfs" 179target "myriadfs"
180{ 180{
181 LDFLAGS += "-lfuse"; 181 LDFLAGS += "-lfuse";
182} 182}
183 183
184target "bin2cpp" 184target "bin2cpp"
185{ 185{
186 LDFLAGS += "-lz -lbz2 -llzma"; 186 LDFLAGS += "-lz -lbz2 -llzma";
187} 187}
188 188
189// 189//
@@ -192,34 +192,34 @@ target "bin2cpp"
192 192
193target files("src/tests/*.cpp").replace("src/","").replace(".cpp","") 193target files("src/tests/*.cpp").replace("src/","").replace(".cpp","")
194{ 194{
195 input "src/${OUTPUT}.cpp"; 195 input "src/${OUTPUT}.cpp";
196 rule "exe"; 196 rule "exe";
197 requires "libbu++.a"; 197 requires "libbu++.a";
198 tag ["tests", "general tests"]; 198 tag ["tests", "general tests"];
199 CXXFLAGS += "-I."; 199 CXXFLAGS += "-I.";
200 LDFLAGS += "-L. -lbu++"; 200 LDFLAGS += "-L. -lbu++";
201} 201}
202 202
203// Some tests need extra libs and whatnot, that goes here. 203// Some tests need extra libs and whatnot, that goes here.
204 204
205target ["tests/bzip2", "tests/streamstack"] 205target ["tests/bzip2", "tests/streamstack"]
206{ 206{
207 LDFLAGS += "-lbz2"; 207 LDFLAGS += "-lbz2";
208} 208}
209 209
210target ["tests/deflate", "tests/enc"] 210target ["tests/deflate", "tests/enc"]
211{ 211{
212 LDFLAGS += "-lz"; 212 LDFLAGS += "-lz";
213} 213}
214 214
215target ["tests/lzma"] 215target ["tests/lzma"]
216{ 216{
217 LDFLAGS += "-llzma"; 217 LDFLAGS += "-llzma";
218} 218}
219 219
220target ["tests/threadid"] 220target ["tests/threadid"]
221{ 221{
222 LDFLAGS += "-lpthread"; 222 LDFLAGS += "-lpthread";
223} 223}
224 224
225// 225//
@@ -228,106 +228,106 @@ target ["tests/threadid"]
228 228
229target files("src/unit/*.unit").replace("src/","").replace(".unit","") 229target files("src/unit/*.unit").replace("src/","").replace(".unit","")
230{ 230{
231 input "src/${OUTPUT}.unit"; 231 input "src/${OUTPUT}.unit";
232 rule "exe"; 232 rule "exe";
233 requires "libbu++.a"; 233 requires "libbu++.a";
234 tag ["tests", "unit tests"]; 234 tag ["tests", "unit tests"];
235 CXXFLAGS += "-I."; 235 CXXFLAGS += "-I.";
236 LDFLAGS += "-L. -lbu++"; 236 LDFLAGS += "-L. -lbu++";
237} 237}
238 238
239PKG_BASE = "libbu++-$(cat version)-r$(svnversion "-n").tar"; 239PKG_BASE = "libbu++-$(cat version)-r$(svnversion "-n").tar";
240 240
241target PKG_BASE 241target PKG_BASE
242{ 242{
243 input [ 243 input [
244 "LICENSE", 244 "LICENSE",
245 "Doxyfile", 245 "Doxyfile",
246 "Makefile", 246 "Makefile",
247 "version", 247 "version",
248 files("*.bld"), 248 files("*.bld"),
249 "support/vim/syntax/taf.vim", 249 "support/vim/syntax/taf.vim",
250 "support/vim/ftdetect/taf.vim", 250 "support/vim/ftdetect/taf.vim",
251 "support/vim/ftplugin/taf.vim", 251 "support/vim/ftplugin/taf.vim",
252 files("*.sh"), 252 files("*.sh"),
253 files("autoconfig.cpp"), 253 files("autoconfig.cpp"),
254 files("src/*.cpp"), 254 files("src/*.cpp"),
255 files("src/*.h"), 255 files("src/*.h"),
256 files("src/stable/*.cpp"), 256 files("src/stable/*.cpp"),
257 files("src/stable/*.h"), 257 files("src/stable/*.h"),
258 files("src/unstable/*.cpp"), 258 files("src/unstable/*.cpp"),
259 files("src/unstable/*.h"), 259 files("src/unstable/*.h"),
260 files("src/experimental/*.cpp"), 260 files("src/experimental/*.cpp"),
261 files("src/experimental/*.h"), 261 files("src/experimental/*.h"),
262 files("src/tests/*.cpp"), 262 files("src/tests/*.cpp"),
263 files("src/tests*.h"), 263 files("src/tests*.h"),
264 files("src/tools/*.cpp"), 264 files("src/tools/*.cpp"),
265 files("src/tools/*.h"), 265 files("src/tools/*.h"),
266 files("src/unit/*.unit"), 266 files("src/unit/*.unit"),
267 files("src/doxy/*.dox"), 267 files("src/doxy/*.dox"),
268 files("src/compat/*.cpp"), 268 files("src/compat/*.cpp"),
269 files("src/compat/*.h"), 269 files("src/compat/*.h"),
270 files("src/extra/*.cpp"), 270 files("src/extra/*.cpp"),
271 files("src/extra/*.h"), 271 files("src/extra/*.h"),
272 files("pregen/*"), 272 files("pregen/*"),
273 "api" 273 "api"
274 ]; 274 ];
275 rule "tarball"; 275 rule "tarball";
276 tag "pkg"; 276 tag "pkg";
277} 277}
278 278
279target PKG_BASE + ".gz" 279target PKG_BASE + ".gz"
280{ 280{
281 input PKG_BASE; 281 input PKG_BASE;
282 tag "pkg"; 282 tag "pkg";
283 display "gzip"; 283 display "gzip";
284 profile "build" 284 profile "build"
285 { 285 {
286 execute("gzip -9 < ${INPUT} > ${OUTPUT}"); 286 execute("gzip -9 < ${INPUT} > ${OUTPUT}");
287 } 287 }
288} 288}
289 289
290target PKG_BASE + ".bz2" 290target PKG_BASE + ".bz2"
291{ 291{
292 input PKG_BASE; 292 input PKG_BASE;
293 tag "pkg"; 293 tag "pkg";
294 display "bzip2"; 294 display "bzip2";
295 profile "build" 295 profile "build"
296 { 296 {
297 execute("bzip2 -9 < ${INPUT} > ${OUTPUT}"); 297 execute("bzip2 -9 < ${INPUT} > ${OUTPUT}");
298 } 298 }
299} 299}
300 300
301target PKG_BASE + ".xz" 301target PKG_BASE + ".xz"
302{ 302{
303 input PKG_BASE; 303 input PKG_BASE;
304 tag "pkg"; 304 tag "pkg";
305 display "xz"; 305 display "xz";
306 profile "build" 306 profile "build"
307 { 307 {
308 execute("xz -9vv < ${INPUT} > ${OUTPUT}"); 308 execute("xz -9vv < ${INPUT} > ${OUTPUT}");
309 } 309 }
310} 310}
311 311
312rule "tarball" 312rule "tarball"
313{ 313{
314 input matches("LICENSE", "Makefile", "*.cpp", "*.h", "*.conf", "*.bld", 314 input matches("LICENSE", "Makefile", "*.cpp", "*.h", "*.conf", "*.bld",
315 "Doxyfile", "*.vim", "*.sh", "*.unit", "api", "version"); 315 "Doxyfile", "*.vim", "*.sh", "*.unit", "api", "version");
316 profile "build" 316 profile "build"
317 { 317 {
318 OUTDIR = OUTPUT.replace(".tar",""); 318 OUTDIR = OUTPUT.replace(".tar","");
319 execute("tar -f ./${OUTPUT} --transform=\"s@^@${OUTDIR}/@\" -c ${INPUT}"); 319 execute("tar -f ./${OUTPUT} --transform=\"s@^@${OUTDIR}/@\" -c ${INPUT}");
320 } 320 }
321} 321}
322 322
323rule "unit" 323rule "unit"
324{ 324{
325 input "*.unit"; 325 input "*.unit";
326 output INPUT.replace(".unit", ".cpp"); 326 output INPUT.replace(".unit", ".cpp");
327 327
328 profile "build" 328 profile "build"
329 { 329 {
330 execute("./mkunit \"${INPUT}\" \"${OUTPUT}\""); 330 execute("./mkunit \"${INPUT}\" \"${OUTPUT}\"");
331 } 331 }
332} 332}
333 333