LEFT | RIGHT |
1 // Copyright 2012 The Go Authors. All rights reserved. | 1 // Copyright 2012 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 #include "a.h" | 5 #include "a.h" |
6 #include "arg.h" | 6 #include "arg.h" |
7 | 7 |
8 /* | 8 /* |
9 * Initialization for any invocation. | 9 * Initialization for any invocation. |
10 */ | 10 */ |
11 | 11 |
12 // The usual variables. | 12 // The usual variables. |
13 char *goarch; | 13 char *goarch; |
14 char *gobin; | 14 char *gobin; |
15 char *gohostarch; | 15 char *gohostarch; |
16 char *gohostchar; | 16 char *gohostchar; |
17 char *gohostos; | 17 char *gohostos; |
18 char *goos; | 18 char *goos; |
19 char *goroot = GOROOT_FINAL; | 19 char *goroot = GOROOT_FINAL; |
20 char *goroot_final = GOROOT_FINAL; | 20 char *goroot_final = GOROOT_FINAL; |
21 char *workdir; | 21 char *workdir; |
22 char *tooldir; | 22 char *tooldir; |
23 char *gochar; | 23 char *gochar; |
24 char *goversion; | 24 char *goversion; |
25 char *slash; // / for unix, \ for windows | 25 char *slash; // / for unix, \ for windows |
26 | 26 |
27 bool rebuildall = 0; | 27 bool rebuildall = 0; |
28 bool keepold = 0; | |
29 | 28 |
30 static bool shouldbuild(char*, char*); | 29 static bool shouldbuild(char*, char*); |
31 static void copy(char*, char*); | 30 static void copy(char*, char*); |
32 static char *findgoversion(void); | 31 static char *findgoversion(void); |
33 | 32 |
34 // The known architecture letters. | 33 // The known architecture letters. |
35 static char *gochars = "568"; | 34 static char *gochars = "568"; |
36 | 35 |
37 // The known architectures. | 36 // The known architectures. |
38 static char *okgoarch[] = { | 37 static char *okgoarch[] = { |
(...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1492 break; | 1491 break; |
1493 default: | 1492 default: |
1494 usage(); | 1493 usage(); |
1495 }ARGEND | 1494 }ARGEND |
1496 | 1495 |
1497 if(argc > 0) | 1496 if(argc > 0) |
1498 usage(); | 1497 usage(); |
1499 | 1498 |
1500 xprintf("%s\n", goversion); | 1499 xprintf("%s\n", goversion); |
1501 } | 1500 } |
LEFT | RIGHT |