diff --git a/src/cmd/dist/buildgo.go b/src/cmd/dist/buildgo.go index 105451bbda..79a9efba9c 100644 --- a/src/cmd/dist/buildgo.go +++ b/src/cmd/dist/buildgo.go @@ -26,7 +26,7 @@ import ( // but we also write cmd/cgo/zdefaultcc.go func mkzdefaultcc(dir, file string) { outGo := fmt.Sprintf( - "// auto generated by go tool dist\n"+ + "// Code generated by go tool dist; DO NOT EDIT.\n"+ "\n"+ "package cfg\n"+ "\n"+ @@ -39,7 +39,7 @@ func mkzdefaultcc(dir, file string) { // Convert file name to replace: turn go/internal/cfg into cgo. outCgo := fmt.Sprintf( - "// auto generated by go tool dist\n"+ + "// Code generated by go tool dist; DO NOT EDIT.\n"+ "\n"+ "package main\n"+ "\n"+ @@ -63,7 +63,7 @@ func mkzosarch(dir, file string) { sort.Strings(list) var buf bytes.Buffer - buf.WriteString("// auto generated by go tool dist\n\n") + buf.WriteString("// Code generated by go tool dist; DO NOT EDIT.\n\n") buf.WriteString("package cfg\n\n") fmt.Fprintf(&buf, "var OSArchSupportsCgo = map[string]bool{\n") for _, plat := range list { @@ -92,7 +92,7 @@ func mkzcgo(dir, file string) { var buf bytes.Buffer fmt.Fprintf(&buf, - "// auto generated by go tool dist\n"+ + "// Code generated by go tool dist; DO NOT EDIT.\n"+ "\n"+ "package build\n"+ "\n"+ diff --git a/src/cmd/dist/buildruntime.go b/src/cmd/dist/buildruntime.go index 1467c59c6c..b885a79228 100644 --- a/src/cmd/dist/buildruntime.go +++ b/src/cmd/dist/buildruntime.go @@ -24,7 +24,7 @@ import ( // func mkzversion(dir, file string) { out := fmt.Sprintf( - "// auto generated by go tool dist\n"+ + "// Code generated by go tool dist; DO NOT EDIT.\n"+ "\n"+ "package sys\n"+ "\n"+ @@ -61,7 +61,7 @@ func mkzversion(dir, file string) { // original target (in this example, a Mac). func mkzbootstrap(file string) { out := fmt.Sprintf( - "// auto generated by go tool dist\n"+ + "// Code generated by go tool dist; DO NOT EDIT.\n"+ "\n"+ "package objabi\n"+ "\n"+ diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go index 77cf41a3eb..52307a3dc4 100644 --- a/src/cmd/dist/buildtool.go +++ b/src/cmd/dist/buildtool.go @@ -227,7 +227,9 @@ func bootstrapRewriteFile(text, srcFile string) string { // binary that works for the current runtime.GOARCH. // This saves 6+ seconds of bootstrap. if archCaps, ok := isUnneededSSARewriteFile(srcFile); ok { - return fmt.Sprintf(`package ssa + return fmt.Sprintf(`// Code generated by go tool dist; DO NOT EDIT. + +package ssa func rewriteValue%s(v *Value) bool { panic("unused during bootstrap") } func rewriteBlock%s(b *Block) bool { panic("unused during bootstrap") } @@ -262,7 +264,7 @@ func bootstrapFixImports(text, srcFile string) string { } } - lines[0] = "// Do not edit. Bootstrap copy of " + srcFile + "\n\n//line " + srcFile + ":1\n" + lines[0] + lines[0] = "// Code generated by go tool dist; DO NOT EDIT.\n// This is a bootstrap copy of " + srcFile + "\n\n//line " + srcFile + ":1\n" + lines[0] return strings.Join(lines, "") } diff --git a/src/cmd/dist/deps.go b/src/cmd/dist/deps.go index 6e2169d6b6..f0de27b79c 100644 --- a/src/cmd/dist/deps.go +++ b/src/cmd/dist/deps.go @@ -1,4 +1,4 @@ -// generated by mkdeps.bash +// Code generated by mkdeps.bash; DO NOT EDIT. package main diff --git a/src/cmd/dist/mkdeps.bash b/src/cmd/dist/mkdeps.bash index 37ce6d6719..fe7611a5c6 100755 --- a/src/cmd/dist/mkdeps.bash +++ b/src/cmd/dist/mkdeps.bash @@ -32,7 +32,7 @@ all="$(deps_of cmd/go | awk '{print $2}') cmd/go" deps_of $all >tmp.all.deps ( - echo '// generated by mkdeps.bash' + echo '// Code generated by mkdeps.bash; DO NOT EDIT.' echo echo 'package main' echo