]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: support building pkg/runtime/*.
authorShenghou Ma <minux.ma@gmail.com>
Wed, 5 Mar 2014 19:57:17 +0000 (14:57 -0500)
committerShenghou Ma <minux.ma@gmail.com>
Wed, 5 Mar 2014 19:57:17 +0000 (14:57 -0500)
Essentialy for running tests without a working cmd/go.
While we're at it, also fix a typo.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/70640043

src/cmd/dist/build.c
src/cmd/dist/buildruntime.c

index b3ed471b9c5379c93987c8537dfbb2b3e529e3b6..6fd2f581ee6c7cab98cb5c556519ced6bb2537ee 100644 (file)
@@ -808,7 +808,8 @@ install(char *dir)
        files.len = n;
 
        for(i=0; i<nelem(deptab); i++) {
-               if(hasprefix(dir, deptab[i].prefix)) {
+               if(streq(dir, deptab[i].prefix) ||
+                  (hassuffix(deptab[i].prefix, "/") && hasprefix(dir, deptab[i].prefix))) {
                        for(j=0; (p=deptab[i].dep[j])!=nil; j++) {
                                breset(&b1);
                                bwritestr(&b1, p);
index 2ab92fb080341dd70a07f94b4e4214bfe2cb23af..e2d46cdac4a8c8b2603db4040a455bb503461749 100644 (file)
@@ -346,7 +346,7 @@ ok:
        vfree(&fields);
 }
 
-// mkzsys writes zsys_$GOOS_$GOARCH.h,
+// mkzsys writes zsys_$GOOS_$GOARCH.s,
 // which contains arch or os specific asm code.
 // 
 void