1 :: Copyright 2012 The Go Authors. All rights reserved.
2 :: Use of this source code is governed by a BSD-style
3 :: license that can be found in the LICENSE file.
8 if exist make.bat goto ok
9 echo Must run make.bat from Go src directory.
13 :: Grab default GOROOT_FINAL and set GOROOT for build.
14 :: The expression %VAR:\=\\% means to take %VAR%
15 :: and apply the substitution \ = \\, escaping the
16 :: backslashes. Then we wrap that in quotes to create
21 if "x%GOROOT_FINAL%"=="x" set GOROOT_FINAL=%GOROOT%
22 set DEFGOROOT=-DGOROOT_FINAL="\"%GOROOT_FINAL:\=\\%\""
24 echo # Building C bootstrap tool.
25 if not exist ..\bin\tool mkdir ..\bin\tool
26 :: Windows has no glob expansion, so spell out cmd/dist/*.c.
27 gcc -O2 -Wall -Werror -o ../bin/tool/dist.exe -Icmd/dist %DEFGOROOT% cmd/dist/buf.c cmd/dist/build.c cmd/dist/buildgc.c cmd/dist/buildruntime.c cmd/dist/goc2c.c cmd/dist/main.c cmd/dist/windows.c
28 if errorlevel 1 goto fail
29 :: Echo with no arguments prints whether echo is turned on, so echo dot.
32 echo # Building compilers and Go bootstrap tool.
33 ..\bin\tool\dist bootstrap -v
34 if errorlevel 1 goto fail
37 echo # Building packages and commands.
38 ..\bin\tool\go_bootstrap clean std
39 if errorlevel 1 goto fail
40 ..\bin\tool\go_bootstrap install -a -v std
41 if errorlevel 1 goto fail
42 del ..\bin\tool\go_bootstrap.exe
45 if "x%1"=="x--no-banner" goto nobanner
46 ..\bin\tool\dist banner