Commit 592c97fc authored by Matthew Dempsky's avatar Matthew Dempsky

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: default avatarIan Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 7751d56e
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment