aboutsummaryrefslogtreecommitdiff
path: root/exec.go
diff options
context:
space:
mode:
authorFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-07-15 14:31:50 +0900
committerFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-07-15 15:27:56 +0900
commit09fcd523c517f4ee4330f004e52ac3e894b86433 (patch)
treec70dd19a1d01ceaabd902f18f23a70f13ac90b2f /exec.go
parent7655f182239daf4865108b7375920f3f21e0f645 (diff)
downloadkati-09fcd523c517f4ee4330f004e52ac3e894b86433.tar.gz
[go] implement vpath directive
Diffstat (limited to 'exec.go')
-rw-r--r--exec.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/exec.go b/exec.go
index 712b917..8aa7a0e 100644
--- a/exec.go
+++ b/exec.go
@@ -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 {