1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
--- a/src/libmach/Makefile
+++ b/src/libmach/Makefile
@@ -49,15 +49,8 @@ OFILES=\
6obj.$O\
8obj.$O\
-ifneq ($(GOHOSTOS),windows)
OFILES+=\
- $(shell uname | tr A-Z a-z).$O\
-
-else
-OFILES+=\
- windows.$O\
-
-endif
+ $(GOOS).$O\
HFILES=../../include/mach.h elf.h macho.h obj.h
--- a/src/cmd/cov/Makefile
+++ b/src/cmd/cov/Makefile
@@ -23,11 +23,7 @@ LIB=\
NOINSTALL=1
include ../../Make.ccmd
-ifeq ($(GOOS),windows)
-NAME=windows
-else
-NAME=$(shell uname | tr A-Z a-z)
-endif
+NAME=$(GOOS)
install: install-$(NAME)
install-linux: install-default
--- a/src/cmd/prof/Makefile
+++ b/src/cmd/prof/Makefile
@@ -19,11 +19,7 @@ LIB=\
NOINSTALL=1
include ../../Make.ccmd
-ifeq ($(GOOS),windows)
-NAME=windows
-else
-NAME=$(shell uname | tr A-Z a-z)
-endif
+NAME=$(GOOS)
install: install-$(NAME) install-pprof
install-linux: install-default
--- a/src/pkg/syscall/mkerrors.sh
+++ b/src/pkg/syscall/mkerrors.sh
@@ -13,9 +13,7 @@ export LC_CTYPE=C
GCC=gcc
-uname=$(uname)
-
-includes_Linux='
+includes_linux='
#define _LARGEFILE_SOURCE
#define _LARGEFILE64_SOURCE
#define _FILE_OFFSET_BITS 64
@@ -36,7 +34,7 @@ includes_Linux='
#include <netpacket/packet.h>
'
-includes_Darwin='
+includes_darwin='
#define _DARWIN_C_SOURCE
#define KERNEL
#define _DARWIN_USE_64_BIT_INODE
@@ -55,7 +53,7 @@ includes_Darwin='
#include <netinet/ip_mroute.h>
'
-includes_FreeBSD='
+includes_freebsd='
#include <sys/types.h>
#include <sys/event.h>
#include <sys/socket.h>
@@ -98,7 +96,7 @@ done
# Write godefs input.
(
- indirect="includes_$(uname)"
+ indirect="includes_$(GOOS)"
echo "${!indirect} $includes"
echo
echo 'enum {'
--- a/src/pkg/net/Makefile
+++ b/src/pkg/net/Makefile
@@ -31,7 +31,7 @@ GOFILES_freebsd=\
port.go\
CGOFILES_freebsd=\
- cgo_bsd.go\
+ cgo_linux.go\
cgo_unix.go\
GOFILES_darwin=\
|