]> Cypherpunks repositories - gostls13.git/commitdiff
build: reject make.bash on Windows
authorRuss Cox <rsc@golang.org>
Mon, 13 Feb 2012 04:14:37 +0000 (23:14 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 13 Feb 2012 04:14:37 +0000 (23:14 -0500)
Also, echo cmd/dist during bootstrap build
Makes that phase look like all the others.

Fixes #2908.

R=golang-dev, alex.brainman, bradfitz
CC=golang-dev
https://golang.org/cl/5655065

src/make.bash
src/make.bat

index 55a292eba42886ad4fae318a61a99bfd83d35e37..81ceeb7298da0dfcd4e8e1cbdef5dbdc3cf90f51 100755 (executable)
@@ -9,6 +9,16 @@ if [ ! -f run.bash ]; then
        exit 1
 fi
 
+# Test for Windows.
+case "$(uname)" in
+*MINGW* | *WIN32* | *CYGWIN*)
+       echo 'ERROR: Do not use make.bash to build on Windows.'
+       echo 'Use make.bat instead.'
+       echo
+       exit 1
+       ;;
+esac
+
 # Test for bad ld.
 if ld --version 2>&1 | grep 'gold.* 2\.20' >/dev/null; then
        echo 'ERROR: Your system has gold 2.20 installed.'
@@ -46,6 +56,7 @@ done
 # Finally!  Run the build.
 
 echo '# Building C bootstrap tool.'
+echo cmd/dist
 mkdir -p ../bin/tool
 export GOROOT="$(cd .. && pwd)"
 GOROOT_FINAL="${GOROOT_FINAL:-$GOROOT}"
index 3a456513faa440a80cf4e687b8fb1a76441c9c7e..010e418c015413b9a3ad425e66f1c7e7bfb9be12 100644 (file)
@@ -1,7 +1,7 @@
 :: Copyright 2012 The Go Authors. All rights reserved.
 :: Use of this source code is governed by a BSD-style
 :: license that can be found in the LICENSE file.
-::@echo off
+@echo off
 
 set GOBUILDFAIL=0
 
@@ -22,6 +22,7 @@ if "x%GOROOT_FINAL%"=="x" set GOROOT_FINAL=%GOROOT%
 set DEFGOROOT=-DGOROOT_FINAL="\"%GOROOT_FINAL:\=\\%\""
 
 echo # Building C bootstrap tool.
+echo cmd/dist
 if not exist ..\bin\tool mkdir ..\bin\tool
 :: Windows has no glob expansion, so spell out cmd/dist/*.c.
 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