From 56ced4bcccf3d361ff9768e78d8118faeb75269a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 20 Dec 2009 06:37:40 +0000 Subject: 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 :) --- buildm3.conf | 68 -------------------------------------------- default.bld | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 68 deletions(-) delete mode 100644 buildm3.conf create mode 100644 default.bld diff --git a/buildm3.conf b/buildm3.conf deleted file mode 100644 index ccc7131..0000000 --- a/buildm3.conf +++ /dev/null @@ -1,68 +0,0 @@ -# vim: syntax=build - -set CXXFLAGS += "-ggdb -W -Wall"; - -action "default" -{ - build: [targets("header-links"), "libbu++.a"]; -} - -action "pkg" -{ - build: targets("pkg"); -} - -target files("src/*.h").replace("src/", "bu/") -{ - tag "header-links"; - display "symlink"; - input OUTPUT.replace("bu/","src/"); - profile "build" - { - execute("ln -s ../${INPUT} ${OUTPUT}"); - } -} - -target "libbu++.a" -{ - input files("src/*.cpp"); - rule "lib"; - set CXXFLAGS += "-I. -fPIC"; -} - -target "libbu++-r$(svnversion "-n").tar.bz2" -{ - input [ - "LICENSE", - "build.conf", - "Doxyfile", - "buildm3.conf", - "support/vim/syntax/taf.vim", - "support/vim/ftdetect/taf.vim", - "support/vim/ftplugin/taf.vim", - files("*.sh"), - files("src/*.cpp"), - files("src/*.h"), - files("src/tests/*.cpp"), - files("src/tests*.h"), - files("src/tools/*.cpp"), - files("src/tools/*.h"), - files("src/unit/*.unit"), - files("src/doxy/*.dox") - ]; - rule "tarball"; - tag "pkg"; -} - -rule "tarball" -{ - input matches("LICENSE", "*.cpp", "*.h", "*.conf", "Doxyfile", "*.vim", - "*.sh"); - profile "build" - { - set OUTDIR = OUTPUT.replace(".tar.bz2",""); - execute("tar --transform=\"s@^@${OUTDIR}/@\" -c ${INPUT} |" - " bzip2 -9 > ${OUTPUT}"); - } -} - diff --git a/default.bld b/default.bld new file mode 100644 index 0000000..8302fc6 --- /dev/null +++ b/default.bld @@ -0,0 +1,93 @@ +# vim: syntax=build + +CXXFLAGS += "-ggdb -W -Wall"; + +action "default" +{ + build: [targets("header-links"), "libbu++.a"]; +} + +action "pkg" +{ + build: targets("pkg"); +} + +action "all" +{ + build: [targets("header-links"), "libbu++.a", targets("tests")]; +} + +target files("src/*.h").replace("src/", "bu/") +{ + tag "header-links"; + display "symlink"; + input OUTPUT.replace("bu/","src/"); + profile "build" + { + execute("ln -s ../${INPUT} ${OUTPUT}"); + } +} + +target "libbu++.a" +{ + input files("src/*.cpp"); + rule "lib"; + CXXFLAGS += "-I. -fPIC"; +} + +// +// Tests +// + +target files("src/tests/*.cpp").replace("src/","").replace(".cpp","") +{ + input "src/${OUTPUT}.cpp"; + rule "exe"; + tag "tests"; + CXXFLAGS += "-I."; + LDFLAGS += "-L. -lbu++"; +} + +// Some tests need extra libs and whatnot, that goes here. + +target "tests/bzip2" +{ + LDFLAGS += "-lbz2"; +} + +target "libbu++-r$(svnversion "-n").tar.bz2" +{ + input [ + "LICENSE", + "build.conf", + "Doxyfile", + "buildm3.conf", + "support/vim/syntax/taf.vim", + "support/vim/ftdetect/taf.vim", + "support/vim/ftplugin/taf.vim", + files("*.sh"), + files("src/*.cpp"), + files("src/*.h"), + files("src/tests/*.cpp"), + files("src/tests*.h"), + files("src/tools/*.cpp"), + files("src/tools/*.h"), + files("src/unit/*.unit"), + files("src/doxy/*.dox") + ]; + rule "tarball"; + tag "pkg"; +} + +rule "tarball" +{ + input matches("LICENSE", "*.cpp", "*.h", "*.conf", "Doxyfile", "*.vim", + "*.sh"); + profile "build" + { + OUTDIR = OUTPUT.replace(".tar.bz2",""); + execute("tar --transform=\"s@^@${OUTDIR}/@\" -c ${INPUT} |" + " bzip2 -9 > ${OUTPUT}"); + } +} + -- cgit v1.2.3