]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: make 'make' quieter for developers
authorRuss Cox <rsc@golang.org>
Wed, 8 Feb 2012 20:26:47 +0000 (15:26 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 8 Feb 2012 20:26:47 +0000 (15:26 -0500)
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5646055

src/Make.dist
src/cmd/dist/build.c
src/cmd/dist/unix.c

index 78e6edf04e62e4ebfc4497f487982c9a40c9cace..cae892de9cab2e118df8b03dc3ca83dcc16f39b4 100644 (file)
@@ -3,12 +3,16 @@
 # license that can be found in the LICENSE file.
 
 # Run go tool dist to install a command.
+# The -v causes dist to print the name of each directory as it runs.
 # The -vv causes dist to print each build command as it runs.
 # go tool dist clean cleans all directories, not just this one,
 # but it's as close as we can get.
 
 # Default target (first).
 install:
+       go tool dist install -v
+
+verbose:
        go tool dist install -vv
 
 clean:
index fff4d62eac20336b1ab155c67d309383f59776f6..c84a7ec7f6a28a54a2e2dea389e05fe3d8297c86 100644 (file)
@@ -501,6 +501,9 @@ install(char *dir)
        Time ttarg, t;
        int i, j, k, n, doclean;
 
+       if(vflag)
+               xprintf("%s\n", dir);
+
        binit(&b);
        binit(&b1);
        binit(&path);
@@ -1242,7 +1245,6 @@ cmdbootstrap(int argc, char **argv)
 {
        int i;
        Buf b;
-       char *p;
 
        ARGBEGIN{
        case 'v':
@@ -1259,12 +1261,8 @@ cmdbootstrap(int argc, char **argv)
        setup();
        
        binit(&b);
-       for(i=0; i<nelem(buildorder); i++) {
-               p = bprintf(&b, buildorder[i], gochar);
-               if(vflag > 0)
-                       xprintf("%s\n", p);
-               install(p);
-       }
+       for(i=0; i<nelem(buildorder); i++)
+               install(bprintf(&b, buildorder[i], gochar));
        bfree(&b);
 }
 
index 348b01e08bfb60a3e2331a7f77578da6d74220e6..e687142e906118cb1a62fd2fe2f7f49e4b511fe5 100644 (file)
@@ -386,7 +386,7 @@ xmkdirall(char *p)
 void
 xremove(char *p)
 {
-       if(vflag > 1)
+       if(vflag > 2)
                xprintf("rm %s\n", p);
        unlink(p);
 }
@@ -408,11 +408,11 @@ xremoveall(char *p)
                        bprintf(&b, "%s/%s", p, dir.p[i]);
                        xremoveall(bstr(&b));
                }
-               if(vflag > 1)
+               if(vflag > 2)
                        xprintf("rm %s\n", p);
                rmdir(p);
        } else {
-               if(vflag > 1)
+               if(vflag > 2)
                        xprintf("rm %s\n", p);
                unlink(p);
        }