# build.conf for build, kind of whacky, eh? default action: check targets() "clean" action: clean "build" "rebuild" action: clean "build", check "build" set "CXXFLAGS" += "-ggdb -Ilibbu++/src" set "LDFLAGS" += "-Llibbu++ -lbu++ -ldl" "build": rule "exe", target file, requires "libbu++/libbu++.a", set "CXXFLAGS" += "-Ilibbu++/src", input filesIn("src") filter regexp(".*\\.(cpp|y|l)$") rule "exe": matches regexp("(.*)\\.o$"), aggregate toString(" "), perform command("g++ -o {target} {match} {LDFLAGS}") rule "cpp": matches regexp("(.*)\\.(cpp|c)$"), produces "{re:1}.o", requires commandToList("g++ -M {CXXFLAGS} {match}", "make"), perform command("g++ {CXXFLAGS} -c -o {target} {match}") rule "bison": matches regexp("(.*)\\.y$"), produces ["{re:1}.tab.c", "{re:1}.tab.h", "{re:1}.output"], perform command("bison -v -b{re:1} {match}") rule "flex": matches regexp("(.*)\\.l$"), produces "{re:1}.yy.c", perform command("flex --bison-bridge --bison-locations -o {target} {match}")