aboutsummaryrefslogtreecommitdiff
path: root/ninja.go
diff options
context:
space:
mode:
authorFumitoshi Ukai <ukai@google.com>2015-07-28 18:08:47 +0900
committerFumitoshi Ukai <ukai@google.com>2015-07-28 18:12:11 +0900
commit786846dc5991f1183460bee69890065356f511e8 (patch)
tree9eb63a1a77157641efc3343439b5dfa64bf1b955 /ninja.go
parent5af212f64dbe9e5c5686bc3690bdca18cc09d92b (diff)
fix err_no_rule.mk - normalize error message
[go] fix not emit phony for missing [c-ninja] mark TODO to recipe_var.mk
Diffstat (limited to 'ninja.go')
-rw-r--r--ninja.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/ninja.go b/ninja.go
index 247a060..884b20d 100644
--- a/ninja.go
+++ b/ninja.go
@@ -31,11 +31,12 @@ import (
type nodeState int
const (
- nodeInit nodeState = iota // not visited
- nodeVisit // visited
- nodeFile // visited & file exists
- nodeAlias // visited & alias for other target
- nodeBuild // visited & build emitted
+ nodeInit nodeState = iota // not visited
+ nodeVisit // visited
+ nodeFile // visited & file exists
+ nodeAlias // visited & alias for other target
+ nodeMissing // visited & no target for this output
+ nodeBuild // visited & build emitted
)
func (s nodeState) String() string {
@@ -48,6 +49,8 @@ func (s nodeState) String() string {
return "node-file"
case nodeAlias:
return "node-alias"
+ case nodeMissing:
+ return "node-missing"
case nodeBuild:
return "node-build"
default:
@@ -441,6 +444,9 @@ func (n *NinjaGenerator) emitNode(node *DepNode) error {
return nil
}
}
+ if node.Filename == "" {
+ n.done[node.Output] = nodeMissing
+ }
return nil
}