summaryrefslogtreecommitdiff
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
commit1bbb93d3d3953d11ac49a2687218a26b741c02f2 (patch)
tree7499fe13a6e750dc5171e4f96f22cfb337d3c0cf /src/make.bat
parent522f785c5cc1e7f6aa96c61856dcd8726b5d9071 (diff)
downloadgo-1bbb93d3d3953d11ac49a2687218a26b741c02f2.tar.gz
cmd/dist: fix GOROOT_FINAL
R=rsc, gustavo CC=golang-dev http://codereview.appspot.com/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 34f436150..804c35ad0 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