aboutsummaryrefslogtreecommitdiff
path: root/ninja.go
diff options
context:
space:
mode:
authorFumitoshi Ukai <ukai@google.com>2015-07-31 17:04:23 +0900
committerFumitoshi Ukai <ukai@google.com>2015-07-31 17:04:23 +0900
commitd1f8fb58d0c4fd7610eeab4d6bd7861398a1a16d (patch)
tree73e5a186b23989dc40d931f18c330793a55d4175 /ninja.go
parentdaf492ca5d659977e883c5b748463229fd07f796 (diff)
[go] don't emit regen envlist as C++
remove --error_on_env_change
Diffstat (limited to 'ninja.go')
-rw-r--r--ninja.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/ninja.go b/ninja.go
index 2e248a0..ecbc6f2 100644
--- a/ninja.go
+++ b/ninja.go
@@ -68,8 +68,6 @@ type NinjaGenerator struct {
GomaDir string
// DetectAndroidEcho detects echo as description.
DetectAndroidEcho bool
- // ErrorOnEnvChange cause error when env change is detected when run ninja.
- ErrorOnEnvChange bool
f *os.File
nodes []*DepNode
@@ -600,26 +598,6 @@ rule regen_ninja
fmt.Fprintf(n.f, " %s", n.envlistName())
}
fmt.Fprintf(n.f, "\n\n")
- if len(usedEnvs) == 0 {
- return nil
- }
- fmt.Fprint(n.f, `
-build .always_build: phony
-rule regen_envlist
- description = Check $out
- generator = 1
- restat = 1
- command = rm -f $out.tmp`)
- for env := range usedEnvs {
- fmt.Fprintf(n.f, " && echo %s=$$%s >> $out.tmp", env, env)
- }
- if n.ErrorOnEnvChange {
- fmt.Fprintln(n.f, " && (cmp -s $out.tmp $out || (echo Environment variable changes are detected && diff -u $out $out.tmp))")
- } else {
- fmt.Fprintln(n.f, " && (cmp -s $out.tmp $out || mv $out.tmp $out)")
- }
-
- fmt.Fprintf(n.f, "build %s: regen_envlist .always_build\n\n", n.envlistName())
return nil
}