aboutsummaryrefslogtreecommitdiff
path: root/src/make.bat
diff options
context:
space:
mode:
authorGustavo Niemeyer <gustavo@niemeyer.net>2012-02-09 20:47:12 -0200
committerGustavo Niemeyer <gustavo@niemeyer.net>2012-02-09 20:47:12 -0200
commit54f1e1b1634cc0292fa8a1ecaf2569caafb257bf (patch)
treeced1a2db21883bc20885a5d59b1cc624fac1b17f /src/make.bat
parenteb02b9cf9c2593d135b504a22f404f33d733e1b7 (diff)
downloadgo-54f1e1b1634cc0292fa8a1ecaf2569caafb257bf.tar.gz
go-54f1e1b1634cc0292fa8a1ecaf2569caafb257bf.zip
cmd/dist: fix GOROOT_FINAL
R=rsc, gustavo CC=golang-dev https://golang.org/cl/5642045
Diffstat (limited to 'src/make.bat')
-rw-r--r--src/make.bat10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/make.bat b/src/make.bat
index 34f4361506..804c35ad04 100644
--- a/src/make.bat
+++ b/src/make.bat
@@ -10,14 +10,16 @@ echo Must run make.bat from Go src directory.
goto fail
:ok
-:: Grab default $GOROOT, escape \ for C string.
-:: The expression %CD:\=\\% means to take %CD%
+:: Grab default GOROOT_FINAL and set GOROOT for build.
+:: The expression %VAR:\=\\% means to take %VAR%
:: and apply the substitution \ = \\, escaping the
:: backslashes. Then we wrap that in quotes to create
:: a C string.
cd ..
-set DEFGOROOT=-DDEFAULT_GOROOT="\"%CD:\=\\%\""
+set GOROOT="%CD%"
cd src
+if "x%GOROOT_FINAL%"=="x" set GOROOT_FINAL="%GOROOT%"
+set DEFGOROOT=-DGOROOT_FINAL="\"%GOROOT_FINAL:\=\\%\""
echo # Building C bootstrap tool.
if not exist ..\bin\tool mkdir ..\bin\tool
@@ -40,7 +42,7 @@ if errorlevel 1 goto fail
del ..\bin\tool\go_bootstrap.exe
echo .
-if x%1==x--no-banner goto nobanner
+if "x%1"=="x--no-banner" goto nobanner
..\bin\tool\dist banner
:nobanner