]> Cypherpunks.ru repositories - gostls13.git/blob - src/make.bat
make.bat: remove double quotes
[gostls13.git] / src / make.bat
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.
4 ::@echo off
5
6 set GOBUILDFAIL=0
7
8 if exist make.bat goto ok
9 echo Must run make.bat from Go src directory.
10 goto fail 
11 :ok
12
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
17 :: a C string.
18 cd ..
19 set GOROOT=%CD%
20 cd src
21 if "x%GOROOT_FINAL%"=="x" set GOROOT_FINAL=%GOROOT%
22 set DEFGOROOT=-DGOROOT_FINAL="\"%GOROOT_FINAL:\=\\%\""
23
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.
30 echo .
31
32 echo # Building compilers and Go bootstrap tool.
33 ..\bin\tool\dist bootstrap -v
34 if errorlevel 1 goto fail
35 echo .
36
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
43 echo .
44
45 if "x%1"=="x--no-banner" goto nobanner
46 ..\bin\tool\dist banner
47 :nobanner
48
49 goto end
50
51 :fail
52 set GOBUILDFAIL=1
53
54 :end