ack/util/cmisc/build.lua
David Given 05ddefad65 Adopt a copy of Minix 2's ed; this allows the ACK's antiquated ed scripts to
run with a minimum of tweaking. Rewriting them for modern ed looks really hard.

Fixes: #84
2018-06-02 18:02:51 +02:00

32 lines
445 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}"
}
}
end
)
cprogram {
name = "ed",
srcs = { "./ed.c" }
}