ack/util/cmisc/build.lua
David Given 5e84be70fd Massive ackbuilder refactor --- cleaner and more expressive. Lists
are automatically flattened (leading to better build files), and the
list and filename functions are vastly more orthogonal.
2016-08-04 23:51:19 +02:00

26 lines
409 B
Lua

cprogram {
name = "tabgen",
srcs = { "./tabgen.c" }
}
definerule("tabgen",
{
srcs = { type="targets" },
},
function(e)
local symname = basename(filenamesof(e.srcs)[1]):gsub("%.tab$", "")
return normalrule {
name = e.name,
ins = {
"util/cmisc+tabgen",
e.srcs
},
outleaves = { symname..".c" },
commands = {
"%{ins[1]} -f%{ins[2]} > %{outs} || rm %{outs}"
}
}
end
)