]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1] cmd/dist: remove stray src/pkg/runtime/z* when cleaning
authorShenghou Ma <minux.ma@gmail.com>
Wed, 13 Jun 2012 20:23:39 +0000 (16:23 -0400)
committerShenghou Ma <minux.ma@gmail.com>
Wed, 13 Jun 2012 20:23:39 +0000 (16:23 -0400)
««« backport 26fc3f8aa53e
cmd/dist: remove stray src/pkg/runtime/z* when cleaning

R=golang-dev, bradfitz, dave, rsc, lstoakes, rsc
CC=golang-dev
https://golang.org/cl/6180044

»»»

src/cmd/dist/build.c

index 3ef65f85d54cf74b24c02c1ae3d78de127ae7ce0..7f9aa7bcd271c01dd2f22e9c76784de4fd85219c 100644 (file)
@@ -1230,6 +1230,15 @@ clean(void)
                        xremove(bpathf(&b, "%s/%s", bstr(&path), cleantab[i]+4));
        }
 
+       // remove src/pkg/runtime/z* unconditionally
+       vreset(&dir);
+       bpathf(&path, "%s/src/pkg/runtime", goroot);
+       xreaddir(&dir, bstr(&path));
+       for(j=0; j<dir.len; j++) {
+               if(hasprefix(dir.p[j], "z"))
+                       xremove(bpathf(&b, "%s/%s", bstr(&path), dir.p[j]));
+       }
+
        if(rebuildall) {
                // Remove object tree.
                xremoveall(bpathf(&b, "%s/pkg/obj/%s_%s", goroot, gohostos, gohostarch));