Makefiles are now slightly less inaccurate. Does actually seem to do sensible
incremental builds now. I loathe make.
This commit is contained in:
parent
de7023dd61
commit
ff9bf5b08a
|
@ -609,15 +609,28 @@ local function install_make_emitter()
|
||||||
end
|
end
|
||||||
|
|
||||||
function emitter:rule(name, ins, outs)
|
function emitter:rule(name, ins, outs)
|
||||||
|
if (#outs == 0) then
|
||||||
|
local n = name.."-IMAGINARY-OUT"
|
||||||
|
emit(".INTERMEDIATE:", n, "\n")
|
||||||
|
outs = {n}
|
||||||
|
end
|
||||||
|
|
||||||
|
local impl = name.."-IMPL"
|
||||||
emit(".INTERMEDIATE:", name, "\n")
|
emit(".INTERMEDIATE:", name, "\n")
|
||||||
for i = 1, #ins do
|
emit(".INTERMEDIATE:", impl, "\n")
|
||||||
emit(name..":", ins[i], "\n")
|
|
||||||
|
for i = 1, #outs do
|
||||||
|
emit(name..":", outs[i], "\n")
|
||||||
end
|
end
|
||||||
for i = 1, #outs do
|
for i = 1, #outs do
|
||||||
emit(outs[i]..":", name, ";\n")
|
emit(outs[i]..":", impl, ";\n")
|
||||||
end
|
end
|
||||||
emit(name..":\n")
|
|
||||||
|
|
||||||
|
for i = 1, #ins do
|
||||||
|
emit(impl..":", ins[i], "\n")
|
||||||
|
end
|
||||||
|
|
||||||
|
emit(impl..":", "\n")
|
||||||
local dirs = uniquify(dirname(outs))
|
local dirs = uniquify(dirname(outs))
|
||||||
if (#dirs > 0) then
|
if (#dirs > 0) then
|
||||||
emit("\t@mkdir -p", dirs, "\n")
|
emit("\t@mkdir -p", dirs, "\n")
|
||||||
|
|
Loading…
Reference in a new issue