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