From c6034cba5444143d3c7661963782b5a4751f2ff5 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 20 Sep 2006 19:26:03 +0000 Subject: new build.conf file --- build.conf | 47 +++++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/build.conf b/build.conf index 3da3df5..48def8a 100644 --- a/build.conf +++ b/build.conf @@ -1,29 +1,24 @@ # This is a build file for libbu++ default action: check "libbu++.a" -"tests" action: check /tests\/.*/ -"clean" action: clean /.*/ -"all" action: check /.*/ - -create file "libbu++.a" from files in src using rule lib - -for directories matching /src\/test\/(.*)/ in src/test ... - create file "tests/{re:1}" from files in "{match}" using rule exe - -set CXXFLAGS += "-ggdb" -set CXXFLAGS += "-Isrc -fPIC" - -for targets matching /tests\/.*/ set LDFLAGS += "-L. -lbu++" -for testes/plugin set LDFLAGS += "-ldl" - -/(.*)\.o$/ requires from command "g++ {CXXFLAGS} -M {re:1}.c*" -/tests\/.*/ requires "libbu++.a" - -rule lib matches all /(.*)\.o$/ perform command ... - "ar cr {target} {match}" - -rule cpp matches one /(.*)\.c(pp)?$/ produces "{re:1}.o" perform command ... - "g++ {CXXFLAGS} -c -o {target} {match}" - -rule exe matches all /(.*)\.o$/ perform command ... - "g++ -o {target} {match} {LDFLAGS}" +"clean" action: clean "libbu++.a" +"all" action: check targets() + +set "CXXFLAGS" += "-ggdb" + +"libbu++.a": + rule "lib", + target file, + set "CXXFLAGS" += "-Isrc -fPIC", + input filesIn("src") filter regexp("^.*\\.cpp$") + +rule "lib": + matches regexp("(.*)\\.o$"), + aggregate toString(" "), + perform command("ar cr {target} {match}") + +rule "cpp": + matches regexp("(.*)\\.cpp$"), + produces "{re:1}.o", + requires commandToList("g++ -M {CXXFLAGS} {match}", "make"), + perform command("g++ {CXXFLAGS} -c -o {target} {match}") -- cgit v1.2.3