aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-12-20 06:37:40 +0000
committerMike Buland <eichlan@xagasoft.com>2009-12-20 06:37:40 +0000
commit56ced4bcccf3d361ff9768e78d8118faeb75269a (patch)
tree22b40384d6fb7f3ee3c0ff41de488a46591c96e5
parent8f5a78eabbbe94e5480078f4fdd29523be17398e (diff)
downloadlibbu++-56ced4bcccf3d361ff9768e78d8118faeb75269a.tar.gz
libbu++-56ced4bcccf3d361ff9768e78d8118faeb75269a.tar.bz2
libbu++-56ced4bcccf3d361ff9768e78d8118faeb75269a.tar.xz
libbu++-56ced4bcccf3d361ff9768e78d8118faeb75269a.zip
I'm really just working on build, but I found an interesting problem, when a
target is specified more than once, the new ones should merely augment the old one, not replace it, this is necesarry, but I think easy as well, but I'm going to switch machines for a bit and so now I commit :)
-rw-r--r--default.bld (renamed from buildm3.conf)31
1 files changed, 28 insertions, 3 deletions
diff --git a/buildm3.conf b/default.bld
index ccc7131..8302fc6 100644
--- a/buildm3.conf
+++ b/default.bld
@@ -1,6 +1,6 @@
1# vim: syntax=build 1# vim: syntax=build
2 2
3set CXXFLAGS += "-ggdb -W -Wall"; 3CXXFLAGS += "-ggdb -W -Wall";
4 4
5action "default" 5action "default"
6{ 6{
@@ -12,6 +12,11 @@ action "pkg"
12 build: targets("pkg"); 12 build: targets("pkg");
13} 13}
14 14
15action "all"
16{
17 build: [targets("header-links"), "libbu++.a", targets("tests")];
18}
19
15target files("src/*.h").replace("src/", "bu/") 20target files("src/*.h").replace("src/", "bu/")
16{ 21{
17 tag "header-links"; 22 tag "header-links";
@@ -27,7 +32,27 @@ target "libbu++.a"
27{ 32{
28 input files("src/*.cpp"); 33 input files("src/*.cpp");
29 rule "lib"; 34 rule "lib";
30 set CXXFLAGS += "-I. -fPIC"; 35 CXXFLAGS += "-I. -fPIC";
36}
37
38//
39// Tests
40//
41
42target files("src/tests/*.cpp").replace("src/","").replace(".cpp","")
43{
44 input "src/${OUTPUT}.cpp";
45 rule "exe";
46 tag "tests";
47 CXXFLAGS += "-I.";
48 LDFLAGS += "-L. -lbu++";
49}
50
51// Some tests need extra libs and whatnot, that goes here.
52
53target "tests/bzip2"
54{
55 LDFLAGS += "-lbz2";
31} 56}
32 57
33target "libbu++-r$(svnversion "-n").tar.bz2" 58target "libbu++-r$(svnversion "-n").tar.bz2"
@@ -60,7 +85,7 @@ rule "tarball"
60 "*.sh"); 85 "*.sh");
61 profile "build" 86 profile "build"
62 { 87 {
63 set OUTDIR = OUTPUT.replace(".tar.bz2",""); 88 OUTDIR = OUTPUT.replace(".tar.bz2","");
64 execute("tar --transform=\"s@^@${OUTDIR}/@\" -c ${INPUT} |" 89 execute("tar --transform=\"s@^@${OUTDIR}/@\" -c ${INPUT} |"
65 " bzip2 -9 > ${OUTPUT}"); 90 " bzip2 -9 > ${OUTPUT}");
66 } 91 }