mirror of
https://github.com/golang/go
synced 2024-11-19 00:54:42 -07:00
cmd/dist: ignore .#foo.go files created by Emacs
go/build already ignores them, but they cause make.bash to fail. Fixes #18931. Change-Id: Idd5c8c2a6f2309ecd5f0d669660704d6f5612710 Reviewed-on: https://go-review.googlesource.com/36351 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
7751d56e39
commit
592c97fc8f
12
src/cmd/dist/buildtool.go
vendored
12
src/cmd/dist/buildtool.go
vendored
@ -70,6 +70,13 @@ var bootstrapDirs = []string{
|
||||
"math/big",
|
||||
}
|
||||
|
||||
// File prefixes that are ignored by go/build anyway, and cause
|
||||
// problems with editor generated temporary files (#18931).
|
||||
var ignorePrefixes = []string{
|
||||
".",
|
||||
"_",
|
||||
}
|
||||
|
||||
// File suffixes that use build tags introduced since Go 1.4.
|
||||
// These must not be copied into the bootstrap build directory.
|
||||
var ignoreSuffixes = []string{
|
||||
@ -103,6 +110,11 @@ func bootstrapBuildTools() {
|
||||
xmkdirall(dst)
|
||||
Dir:
|
||||
for _, name := range xreaddirfiles(src) {
|
||||
for _, pre := range ignorePrefixes {
|
||||
if strings.HasPrefix(name, pre) {
|
||||
continue Dir
|
||||
}
|
||||
}
|
||||
for _, suf := range ignoreSuffixes {
|
||||
if strings.HasSuffix(name, suf) {
|
||||
continue Dir
|
||||
|
Loading…
Reference in New Issue
Block a user