diff options
author | Fumitoshi Ukai <fumitoshi.ukai@gmail.com> | 2015-07-15 14:31:50 +0900 |
---|---|---|
committer | Fumitoshi Ukai <fumitoshi.ukai@gmail.com> | 2015-07-15 15:27:56 +0900 |
commit | 09fcd523c517f4ee4330f004e52ac3e894b86433 (patch) | |
tree | c70dd19a1d01ceaabd902f18f23a70f13ac90b2f /exec.go | |
parent | 7655f182239daf4865108b7375920f3f21e0f645 (diff) | |
download | kati-09fcd523c517f4ee4330f004e52ac3e894b86433.tar.gz |
[go] implement vpath directive
Diffstat (limited to 'exec.go')
-rw-r--r-- | exec.go | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -44,7 +44,7 @@ type Executor struct { } func (ex *Executor) makeJobs(n *DepNode, neededBy *job) error { - output, _ := existsInVPATH(ex.ctx.ev, n.Output) + output, _ := ex.ctx.vpaths.exists(n.Output) if neededBy != nil { glog.V(1).Infof("MakeJob: %s for %s", output, neededBy.n.Output) } @@ -92,8 +92,7 @@ func (ex *Executor) makeJobs(n *DepNode, neededBy *job) error { deps = append(deps, d) } for _, d := range n.OrderOnlys { - // need lock for ex.ctx.ev? - if _, ok := existsInVPATH(ex.ctx.ev, d.Output); ok { + if _, ok := ex.ctx.vpaths.exists(d.Output); ok { j.numDeps-- continue } @@ -154,7 +153,7 @@ func NewExecutor(opt *ExecutorOpt) (*Executor, error) { // Exec executes to build roots. func (ex *Executor) Exec(g *DepGraph) error { - ex.ctx = newExecContext(g.vars, false) + ex.ctx = newExecContext(g.vars, g.vpaths, false) // TODO: Handle target specific variables. for name, export := range g.exports { |