]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: remove stray src/pkg/runtime/z* when cleaning
authorShenghou Ma <minux.ma@gmail.com>
Thu, 3 May 2012 16:58:48 +0000 (00:58 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Thu, 3 May 2012 16:58:48 +0000 (00:58 +0800)
R=golang-dev, bradfitz, dave, rsc, lstoakes, rsc
CC=golang-dev
https://golang.org/cl/6180044

src/cmd/dist/build.c

index b8a135515a4a2ae902c1256e849ce568fbc01fc7..b2f852fce36ee64ac2470664528604fa3d7e843d 100644 (file)
@@ -1285,6 +1285,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));