From 83d28a0cd387362c9f31f11783556c0ac547b3cd Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sat, 13 Jun 2020 16:20:34 -0700 Subject: Use variable name that matches ninja variable --- ninja.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ninja.lua') diff --git a/ninja.lua b/ninja.lua index 9a3c8f21..c77de768 100644 --- a/ninja.lua +++ b/ninja.lua @@ -144,7 +144,7 @@ end function iterlines(file, raw) table.insert(pkg.inputs.gen, '$dir/'..file) - file = string.format('%s/%s/%s', basedir, pkg.dir, file) + file = string.format('%s/%s/%s', basedir, pkg.gendir, file) if raw then return io.lines(file) end @@ -157,7 +157,7 @@ end function load(file) table.insert(pkg.inputs.gen, '$dir/'..file) - return dofile(string.format('%s/%s/%s', basedir, pkg.dir, file)) + return dofile(string.format('%s/%s/%s', basedir, pkg.gendir, file)) end -- @@ -226,7 +226,7 @@ end function sub(name, fn) local old = io.output() - io.output(pkg.dir..'/'..name) + io.output(pkg.gendir..'/'..name) fn() io.output(old) subninja(name) @@ -431,7 +431,7 @@ local function fs(name, path) end function file(path, mode, src) - if pkg.dir:hasprefix('pkg/') and not fs(pkg.name, path) then + if pkg.gendir:hasprefix('pkg/') and not fs(pkg.name, path) then return end local out = '$builddir/root.hash/'..path @@ -447,7 +447,7 @@ function file(path, mode, src) end function dir(path, mode) - if pkg.dir:hasprefix('pkg/') and not fs(pkg.name, path) then + if pkg.gendir:hasprefix('pkg/') and not fs(pkg.name, path) then return end mode = tonumber(mode, 8) @@ -455,7 +455,7 @@ function dir(path, mode) end function sym(path, target) - if pkg.dir:hasprefix('pkg/') and not fs(pkg.name, path) then + if pkg.gendir:hasprefix('pkg/') and not fs(pkg.name, path) then return end local out = '$builddir/root.hash/'..path -- cgit v1.2.3