Browse Source

windows: use go generate to build zsyscall_windows.go

Also remove some empty source files while we are at it.

Change-Id: Ia3a35b274a0428196aee63ee2daacc533285d0ea
Reviewed-on: https://go-review.googlesource.com/2530
Reviewed-by: Rob Pike <r@golang.org>
Alex Brainman 11 years ago
parent
commit
40756181e9

+ 0 - 12
windows/Makefile

@@ -1,12 +0,0 @@
-# Copyright 2014 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.
-
-all: zsyscall_windows.go
-
-TMP=/tmp/mksyscall_windows
-
-zsyscall_windows.go: syscall_windows.go security_windows.go
-	go build -o $(TMP) $(GOROOT)/src/syscall/mksyscall_windows.go
-	GOOS=windows $(TMP) $^ | gofmt > $@
-	rm $(TMP)

+ 0 - 15
windows/mkall_windows.bat

@@ -1,15 +0,0 @@
-:: Copyright 2013 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
-
-if exist syscall_windows.go goto dirok
-echo mkall_windows.bat must be run from go.sys\windows directory
-goto :end
-:dirok
-
-go build -o mksyscall_windows.exe %GOROOT%\src\pkg\syscall\mksyscall_windows.go
-mksyscall_windows.exe syscall_windows.go security_windows.go |gofmt >zsyscall_windows.go
-del mksyscall_windows.exe
-
-:end

+ 2 - 0
windows/syscall_windows.go

@@ -14,6 +14,8 @@ import (
 	"unsafe"
 )
 
+//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall_windows.go security_windows.go
+
 type Handle uintptr
 
 const InvalidHandle = ^Handle(0)

+ 0 - 5
windows/syscall_windows_386.go

@@ -1,5 +0,0 @@
-// Copyright 2009 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.
-
-package windows

+ 0 - 5
windows/syscall_windows_amd64.go

@@ -1,5 +0,0 @@
-// Copyright 2009 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.
-
-package windows

+ 0 - 3
windows/zsysnum_windows_386.go

@@ -1,3 +0,0 @@
-// nothing to see here
-
-package windows

+ 0 - 3
windows/zsysnum_windows_amd64.go

@@ -1,3 +0,0 @@
-// nothing to see here
-
-package windows