aboutsummaryrefslogtreecommitdiff
path: root/ninja.go
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2015-08-24 16:20:35 -0700
committerDan Willemsen <dwillemsen@google.com>2015-08-25 12:43:56 -0700
commit4822117b1cef82241fb8d909c64be120e966683f (patch)
treed657f8a2e6d2287188c73b593dc60bdf94ffc55e /ninja.go
parent1d92d8a4f25e2f39a111410cdfbf1982d88f58e6 (diff)
Remove ninja shortcuts
These don't exist in make, and likely won't be supported in Android's future build system either, so don't expose it here. Change-Id: I20b70d469ac9e0e5e16c0878ca8b9c0c2c299384
Diffstat (limited to 'ninja.go')
-rw-r--r--ninja.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/ninja.go b/ninja.go
index ecbc6f2..f90ff24 100644
--- a/ninja.go
+++ b/ninja.go
@@ -77,7 +77,6 @@ type NinjaGenerator struct {
ruleID int
done map[string]nodeState
- shortNames map[string][]string
}
func (n *NinjaGenerator) init(g *DepGraph) {
@@ -86,7 +85,6 @@ func (n *NinjaGenerator) init(g *DepGraph) {
n.exports = g.exports
n.ctx = newExecContext(g.vars, g.vpaths, true)
n.done = make(map[string]nodeState)
- n.shortNames = make(map[string][]string)
}
func getDepfileImpl(ss string) (string, error) {
@@ -505,11 +503,6 @@ func (n *NinjaGenerator) emitNode(node *DepNode) error {
return nil
}
- base := filepath.Base(output)
- if base != output {
- n.shortNames[base] = append(n.shortNames[base], output)
- }
-
runners, _, err := createRunners(n.ctx, node)
if err != nil {
return err
@@ -756,25 +749,6 @@ func (n *NinjaGenerator) generateNinja(defaultTarget string) (err error) {
if defaultTarget != "" && n.done[defaultTarget] == nodeBuild {
fmt.Fprintf(n.f, "\ndefault %s\n", escapeNinja(defaultTarget))
}
-
- var names []string
- for name := range n.shortNames {
- if n.done[name] != nodeInit {
- continue
- }
- if len(n.shortNames[name]) != 1 {
- // we generate shortcuts only for targets whose basename are unique.
- continue
- }
- names = append(names, name)
- }
- if len(names) > 0 {
- fmt.Fprintf(n.f, "\n# shortcuts:\n")
- sort.Strings(names)
- for _, name := range names {
- fmt.Fprintf(n.f, "build %s: phony %s\n", name, n.shortNames[name][0])
- }
- }
return nil
}