aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2012-02-06 13:34:25 -0500
committerRuss Cox <rsc@golang.org>2012-02-06 13:34:25 -0500
commitfec7fa8b9deb5f0c08c546ad2ba121d78e104163 (patch)
tree6da77ebc491bd624387f51e0e73c969636b3503e
parente335ec98b5f897afee90462bd95cf3cec42e115a (diff)
downloadgo-fec7fa8b9deb5f0c08c546ad2ba121d78e104163.tar.gz
go-fec7fa8b9deb5f0c08c546ad2ba121d78e104163.zip
build: delete make paraphernalia
As a convenience to people working on the tools, leave Makefiles that invoke the go dist tool appropriately. They are not used during the build. R=golang-dev, bradfitz, n13m3y3r, gustavo CC=golang-dev https://golang.org/cl/5636050
-rw-r--r--src/Make.ccmd48
-rw-r--r--src/Make.clib37
-rw-r--r--src/Make.cmd33
-rw-r--r--src/Make.common22
-rw-r--r--src/Make.ctool48
-rw-r--r--src/Make.dist15
-rw-r--r--src/Make.inc177
-rwxr-xr-xsrc/all-qemu.bash16
-rw-r--r--src/buildinfo.sh40
-rw-r--r--src/cmd/5a/Makefile25
-rw-r--r--src/cmd/5c/Makefile33
-rw-r--r--src/cmd/5g/Makefile35
-rw-r--r--src/cmd/5l/Makefile42
-rw-r--r--src/cmd/6a/Makefile25
-rw-r--r--src/cmd/6c/Makefile35
-rw-r--r--src/cmd/6g/Makefile34
-rw-r--r--src/cmd/6l/Makefile47
-rw-r--r--src/cmd/8a/Makefile25
-rw-r--r--src/cmd/8c/Makefile36
-rw-r--r--src/cmd/8g/Makefile35
-rw-r--r--src/cmd/8l/Makefile48
-rw-r--r--src/cmd/Makefile60
-rw-r--r--src/cmd/cc/Makefile36
-rw-r--r--src/cmd/cov/Makefile40
-rw-r--r--src/cmd/gc/Makefile67
-rw-r--r--src/cmd/nm/Makefile14
-rw-r--r--src/cmd/pack/Makefile11
-rw-r--r--src/cmd/prof/Makefile37
-rw-r--r--src/lib9/Makefile121
-rw-r--r--src/libbio/Makefile54
-rw-r--r--src/libmach/Makefile67
-rw-r--r--src/pkg/unicode/Makefile2
-rwxr-xr-xsrc/quietgcc.bash44
-rwxr-xr-xsrc/version.bash50
34 files changed, 76 insertions, 1383 deletions
diff --git a/src/Make.ccmd b/src/Make.ccmd
deleted file mode 100644
index ad31944225..0000000000
--- a/src/Make.ccmd
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 2010 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.
-
-# Makefile for commands written in C.
-
-ifeq (windows,$(findstring windows, $(shell uname | tr A-Z a-z | sed 's/mingw/windows/')))
-TARG:=$(TARG).exe
-endif
-
-$(TARG): $(OFILES) $(LIB)
- $(HOST_LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lmach -lbio -l9 -lm $(HOST_LDFLAGS)
-
-$(OFILES): $(HFILES)
-
-CLEANFILES+=y.tab.[ch]
-
-clean:
- rm -f *.$(HOST_O) $(TARG) $(CLEANFILES)
-
-nuke: clean
- rm -f "$(GOBIN)/$(TARG)"
-
-ifneq ($(NOINSTALL),1)
-install: $(QUOTED_GOBIN)/$(TARG)
-endif
-
-$(QUOTED_GOBIN)/$(TARG): $(TARG)
- cp $(TARG) "$(GOBIN)"/$(TARG)
-
-y.tab.h: $(YFILES)
- bison -y $(HOST_YFLAGS) $(YFILES)
-
-y.tab.c: y.tab.h
- test -f y.tab.c && touch y.tab.c
-
-all: $(TARG)
-
-# Use $(PWD)/$*.c so that gdb shows full path in stack traces.
-%.$(HOST_O): %.c
- $(HOST_CC) $(HOST_CFLAGS) "$(PWD)/$*.c"
-
-# These are used by enough different Makefiles to be
-# worth writing down in one place, even if they don't
-# apply to every command that builds with Make.ccmd
-../%l/enam.o:
- cd ../$*l; $(MAKE) enam.o
-
diff --git a/src/Make.clib b/src/Make.clib
deleted file mode 100644
index d8bd8a3d02..0000000000
--- a/src/Make.clib
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 2010 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.
-
-# Makefile included for C libraries
-
-all: $(LIB)
-
-# Use $(PWD)/$*.c so that gdb shows full path in stack traces.
-%.$(HOST_O): %.c
- $(HOST_CC) $(HOST_CFLAGS) "$(PWD)/$*.c"
-
-$(OFILES): $(HFILES)
-
-ifneq ($(NOINSTALL),1)
-install: $(QUOTED_GOROOT)/lib/$(LIB)
-endif
-
-$(QUOTED_GOROOT)/lib/$(LIB): $(LIB)
- cp $(LIB) "$(GOROOT)/lib/$(LIB)"
-
-$(LIB): $(OFILES)
- $(HOST_AR) rsc $(LIB) $(OFILES)
-
-CLEANFILES+=a.out $(LIB)
-
-clean:
- rm -f *.$(HOST_O) $(CLEANFILES)
-
-nuke: clean
- rm -f "$(GOROOT)/lib/$(LIB)"
-
-y.tab.h%: $(YFILES)
- LANG=C LANGUAGE="en_US.UTF8" bison -v -y $(HOST_YFLAGS) $(YFILES)
-
-y.tab.c: y.tab.h
- test -f y.tab.c && touch y.tab.c
diff --git a/src/Make.cmd b/src/Make.cmd
deleted file mode 100644
index aacdb14caa..0000000000
--- a/src/Make.cmd
+++ /dev/null
@@ -1,33 +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.
-
-ifeq ($(GOOS),windows)
-TARG:=$(TARG).exe
-endif
-
-ifeq ($(TARGDIR),)
-TARGDIR:=$(QUOTED_GOBIN)
-endif
-
-all: $(TARG)
-
-include $(QUOTED_GOROOT)/src/Make.common
-
-PREREQ+=$(patsubst %,%.make,$(DEPS))
-
-$(TARG): _go_.$O
- $(LD) $(LDIMPORTS) -o $@ _go_.$O
-
-_go_.$O: $(GOFILES) $(PREREQ)
- $(GC) $(GCFLAGS) $(GCIMPORTS) -o $@ $(GOFILES)
-
-install: $(TARGDIR)/$(TARG)
-
-$(TARGDIR)/$(TARG): $(TARG)
- mkdir -p $(TARGDIR) && cp -f $(TARG) $(TARGDIR)
-
-CLEANFILES+=$(TARG) _test _testmain.go test.out build.out
-
-nuke: clean
- rm -f $(TARGDIR)/$(TARG)
diff --git a/src/Make.common b/src/Make.common
deleted file mode 100644
index 0b27d07f9a..0000000000
--- a/src/Make.common
+++ /dev/null
@@ -1,22 +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.
-
-clean:
- rm -rf *.o *.a *.[$(OS)] [$(OS)].out $(CLEANFILES)
-
-install.clean: install
- rm -rf *.o *.a *.[$(OS)] [$(OS)].out $(CLEANFILES) || true
-
-test.clean: test
- rm -rf *.o *.a *.[$(OS)] [$(OS)].out $(CLEANFILES) || true
-
-testshort.clean: testshort
- rm -rf *.o *.a *.[$(OS)] [$(OS)].out $(CLEANFILES) || true
-
-%.make:
- $(MAKE) -C $* install
-
-.PHONY: all clean nuke install coverage test bench testpackage-clean\
- importpath dir
-
diff --git a/src/Make.ctool b/src/Make.ctool
deleted file mode 100644
index 6898ebca32..0000000000
--- a/src/Make.ctool
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 2010 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.
-
-# Makefile for commands written in C.
-
-# Tools always go into $GOROOT/bin/tool
-
-ifeq (windows,$(findstring windows, $(shell uname | tr A-Z a-z | sed 's/mingw/windows/')))
-TARG:=$(TARG).exe
-endif
-
-$(TARG): $(OFILES) $(LIB)
- $(HOST_LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lmach -lbio -l9 -lm $(HOST_LDFLAGS)
-
-$(OFILES): $(HFILES)
-
-clean:
- rm -f *.$(HOST_O) $(TARG) $(CLEANFILES)
-
-nuke: clean
- rm -f "$(GOROOT)/bin/tool/$(TARG)"
-
-ifneq ($(NOINSTALL),1)
-install: $(QUOTED_GOROOT)/bin/tool/$(TARG)
-endif
-
-$(QUOTED_GOROOT)/bin/tool/$(TARG): $(TARG)
- mkdir -p "$(GOROOT)/bin/tool" && cp $(TARG) "$(GOROOT)/bin/tool/$(TARG)"
-
-y.tab.h: $(YFILES)
- bison -y $(HOST_YFLAGS) $(YFILES)
-
-y.tab.c: y.tab.h
- test -f y.tab.c && touch y.tab.c
-
-all: $(TARG)
-
-# Use $(PWD)/$*.c so that gdb shows full path in stack traces.
-%.$(HOST_O): %.c
- $(HOST_CC) $(HOST_CFLAGS) "$(PWD)/$*.c"
-
-# These are used by enough different Makefiles to be
-# worth writing down in one place, even if they don't
-# apply to every command that builds with Make.ccmd
-../%l/enam.o:
- cd ../$*l; $(MAKE) enam.o
-
diff --git a/src/Make.dist b/src/Make.dist
new file mode 100644
index 0000000000..78e6edf04e
--- /dev/null
+++ b/src/Make.dist
@@ -0,0 +1,15 @@
+# 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.
+
+# Run go tool dist to install a command.
+# The -vv causes dist to print each build command as it runs.
+# go tool dist clean cleans all directories, not just this one,
+# but it's as close as we can get.
+
+# Default target (first).
+install:
+ go tool dist install -vv
+
+clean:
+ go tool dist clean
diff --git a/src/Make.inc b/src/Make.inc
deleted file mode 100644
index 1b8a705453..0000000000
--- a/src/Make.inc
+++ /dev/null
@@ -1,177 +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.
-
-# Makefile included by all other Go makefiles.
-
-# Clear variables that must come from Makefiles,
-# not the environment.
-LIB:=
-TARG:=
-GOFILES:=
-HFILES:=
-OFILES:=
-YFILES:=
-
-# GOROOT must be set.
-ifeq ($(GOROOT),)
-$(error $$GOROOT is not set; use gomake or set $$GOROOT in your environment)
-endif
-
-# Set up GOROOT_FINAL, GOARCH, GOOS if needed.
-GOROOT_FINAL?=$(GOROOT)
-
-ifeq ($(GOHOSTOS),)
-GOHOSTOS:=$(shell uname | tr A-Z a-z | sed 's/mingw/windows/; s/.*windows.*/windows/')
-endif
-
-ifeq ($(GOOS),)
-GOOS:=$(GOHOSTOS)
-endif
-
-GOOS_LIST=\
- darwin\
- freebsd\
- linux\
- netbsd\
- openbsd\
- plan9\
- windows\
-
-GOARCH_LIST=\
- 386\
- amd64\
- arm\
-
-ifeq ($(filter $(GOOS),$(GOOS_LIST)),)
-$(error Invalid $$GOOS '$(GOOS)'; must be one of: $(GOOS_LIST))
-endif
-
-ifeq ($(GOHOSTARCH),)
-ifeq ($(GOHOSTOS),darwin)
-# Even on 64-bit platform, darwin uname -m prints i386.
-# Check for amd64 with sysctl instead.
-GOHOSTARCH:=${shell if sysctl machdep.cpu.extfeatures | grep EM64T >/dev/null; then echo amd64; else uname -m | sed 's/i386/386/'; fi}
-else
-# Ask uname -m for the processor.
-GOHOSTARCH:=${shell uname -m | sed 's/^..86$$/386/; s/^.86$$/386/; s/x86_64/amd64/; s/arm.*/arm/'}
-endif
-endif
-
-ifeq ($(GOARCH),)
-GOARCH:=$(GOHOSTARCH)
-endif
-
-# darwin requires GOHOSTARCH match GOARCH
-ifeq ($(GOOS),darwin)
-GOHOSTARCH:=$(GOARCH)
-endif
-
-ifeq ($(filter $(GOARCH),$(GOARCH_LIST)),)
-$(error Invalid $$GOARCH '$(GOARCH)'; must be one of: $(GOARCH_LIST))
-endif
-
-ifeq ($(GOARCH),386)
-O:=8
-else ifeq ($(GOARCH),amd64)
-O:=6
-else ifeq ($(GOARCH),arm)
-O:=5
-ifneq ($(GOOS),linux)
-$(error Invalid $$GOOS '$(GOOS)' for GOARCH=arm; must be linux)
-endif
-else
-$(error Missing $$O for '$(GOARCH)')
-endif
-
-# Save for recursive make to avoid recomputing.
-export GOARCH GOOS GOHOSTARCH GOHOSTOS GOARCH_LIST GOOS_LIST
-
-# ugly hack to deal with whitespaces in $GOROOT
-nullstring :=
-space := $(nullstring) # a space at the end
-QUOTED_GOROOT:=$(subst $(space),\ ,$(GOROOT))
-
-# default GOBIN
-ifndef GOBIN
-GOBIN=$(QUOTED_GOROOT)/bin
-endif
-QUOTED_GOBIN=$(subst $(space),\ ,$(GOBIN))
-
-AS=$(QUOTED_GOROOT)/bin/tool/$(O)a
-CC=$(QUOTED_GOROOT)/bin/tool/$(O)c
-GC=$(QUOTED_GOROOT)/bin/tool/$(O)g
-LD=$(QUOTED_GOROOT)/bin/tool/$(O)l
-OS=568vq
-CFLAGS=-FVw
-
-HOST_CC=$(QUOTED_GOROOT)/bin/tool/quietgcc
-HOST_LD=$(QUOTED_GOROOT)/bin/tool/quietgcc
-HOST_O=o
-HOST_YFLAGS=-d
-HOST_AR?=ar
-
-# These two variables can be overridden in the environment
-# to build with other flags. They are like $CFLAGS and $LDFLAGS
-# in a more typical GNU build. We are more explicit about the names
-# here because there are different compilers being run during the
-# build (both gcc and 6c, for example).
-HOST_EXTRA_CFLAGS?=-ggdb -O2
-HOST_EXTRA_LDFLAGS?=
-
-# The -fno-common here is not necessary, but some compilers
-# on OS X seem to set it by default. Setting it here keeps the build
-# working in that non-standard context.
-HOST_CFLAGS=-c -fno-common -I"$(GOROOT)/include" $(HOST_EXTRA_CFLAGS)
-HOST_LDFLAGS=$(HOST_EXTRA_LDFLAGS)
-PWD=$(shell pwd)
-
-# Decide whether use of cgo is okay.
-ifeq ($(CGO_ENABLED),)
-# Default on...
-CGO_ENABLED:=1
-ifeq ($(GOARCH),arm) # ... but not on ARM
-CGO_ENABLED:=0
-endif
-ifeq ($(GOOS),plan9) # ... and not on Plan 9
-CGO_ENABLED:=0
-endif
-ifeq ($(GOOS),openbsd) # ... and not on OpenBSD
-CGO_ENABLED:=0
-endif
-ifeq ($(GOOS),netbsd) # ... and not on NetBSD
-CGO_ENABLED:=0
-endif
-endif
-
-# Make environment more standard.
-LANG:=
-LC_ALL:=C
-LC_CTYPE:=C
-GREP_OPTIONS:=
-GREP_COLORS:=
-export LANG LC_ALL LC_CTYPE GREP_OPTIONS GREP_COLORS
-
-go-env:
- @echo export GOARCH="$(GOARCH)"
- @echo export GOOS="$(GOOS)"
- @echo export GOHOSTARCH="$(GOHOSTARCH)"
- @echo export GOHOSTOS="$(GOHOSTOS)"
- @echo export CGO_ENABLED="$(CGO_ENABLED)"
- @echo export O="$O"
- @echo export AS="$(AS)"
- @echo export CC="$(CC)"
- @echo export GC="$(GC)"
- @echo export LD="$(LD)"
- @echo export OS="$(OS)"
- @echo export CFLAGS="$(CFLAGS)"
- @echo export LANG="$(LANG)"
- @echo export LC_ALL="$(LC_ALL)"
- @echo export LC_CTYPE="$(LC_CTYPE)"
- @echo export GREP_OPTIONS="$(GREP_OPTIONS)"
- @echo export GREP_COLORS="$(GREP_COLORS)"
- @echo MAKE_GO_ENV_WORKED=1
-
-# Don't let the targets in this file be used
-# as the default make target.
-.DEFAULT_GOAL:=
diff --git a/src/all-qemu.bash b/src/all-qemu.bash
deleted file mode 100755
index 6a659d6d4c..0000000000
--- a/src/all-qemu.bash
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2011 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.
-
-# Run all.bash but exclude tests that depend on functionality
-# missing in QEMU's system call emulation.
-
-export GOARCH=arm
-export NOTEST=""
-NOTEST="$NOTEST big" # just slow
-NOTEST="$NOTEST go/build" # wants to run cgo
-NOTEST="$NOTEST http http/cgi net rpc syslog websocket" # no localhost network
-NOTEST="$NOTEST os" # 64-bit seek fails
-
-./all.bash
diff --git a/src/buildinfo.sh b/src/buildinfo.sh
deleted file mode 100644
index 4725b39720..0000000000
--- a/src/buildinfo.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 2011 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.
-
-# This file is included by shell scripts that need to know the
-# full list of architectures, operating systems, and combinations
-# that Go runs on.
-
-GOARCHES="
- 386
- amd64
- arm
-"
-
-GOOSES="
- darwin
- freebsd
- linux
- netbsd
- openbsd
- plan9
- windows
-"
-
-GOOSARCHES="
- darwin_386
- darwin_amd64
- freebsd_386
- freebsd_amd64
- linux_386
- linux_amd64
- linux_arm
- netbsd_386
- netbsd_amd64
- openbsd_386
- openbsd_amd64
- plan9_386
- windows_386
- windows_amd64
-"
diff --git a/src/cmd/5a/Makefile b/src/cmd/5a/Makefile
index 9a19f197fb..538ffb1a76 100644
--- a/src/cmd/5a/Makefile
+++ b/src/cmd/5a/Makefile
@@ -1,25 +1,10 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
+include ../../Make.dist
-TARG=5a
+install: y.tab.h
-HFILES=\
- a.h\
- y.tab.h\
- ../5l/5.out.h\
-
-OFILES=\
- y.tab.$O\
- lex.$O\
- ../5l/enam.$O\
-
-YFILES=\
- a.y\
-
-include ../../Make.ctool
-
-lex.$O: ../cc/macbody ../cc/lexbody
+y.tab.h: a.y
+ LANG=C LANGUAGE=en_US.UTF8 bison -v -y a.y
diff --git a/src/cmd/5c/Makefile b/src/cmd/5c/Makefile
index d2cddfa522..3f528d7517 100644
--- a/src/cmd/5c/Makefile
+++ b/src/cmd/5c/Makefile
@@ -1,34 +1,5 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
-
-TARG=5c
-
-HFILES=\
- gc.h\
- ../5l/5.out.h\
- ../cc/cc.h\
-
-OFILES=\
- cgen.$O\
- list.$O\
- sgen.$O\
- swt.$O\
- txt.$O\
- mul.$O\
- reg.$O\
- peep.$O\
- pgen.$O\
- pswt.$O\
- ../5l/enam.$O\
-
-LIB=\
- ../cc/cc.a$O\
-
-include ../../Make.ctool
-
-%.$O: ../cc/%.c
- $(HOST_CC) $(HOST_CFLAGS) -I. -o $@ ../cc/$*.c
+include ../../Make.dist
diff --git a/src/cmd/5g/Makefile b/src/cmd/5g/Makefile
index 647446246b..3f528d7517 100644
--- a/src/cmd/5g/Makefile
+++ b/src/cmd/5g/Makefile
@@ -1,36 +1,5 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
-
-TARG=5g
-
-HFILES=\
- ../gc/go.h\
- ../5l/5.out.h\
- gg.h\
- opt.h\
-
-OFILES=\
- ../5l/enam.$O\
- cgen.$O\
- cgen64.$O\
- cplx.$O\
- galign.$O\
- ggen.$O\
- gobj.$O\
- gsubr.$O\
- list.$O\
- peep.$O\
- pgen.$O\
- reg.$O\
-
-LIB=\
- ../gc/gc.a$O\
-
-include ../../Make.ctool
-
-%.$O: ../gc/%.c
- $(HOST_CC) $(HOST_CFLAGS) -I. -o $@ ../gc/$*.c
+include ../../Make.dist
diff --git a/src/cmd/5l/Makefile b/src/cmd/5l/Makefile
index b68190d12a..3f528d7517 100644
--- a/src/cmd/5l/Makefile
+++ b/src/cmd/5l/Makefile
@@ -1,43 +1,5 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
-
-TARG=5l
-
-OFILES=\
- asm.$O\
- data.$O\
- elf.$O\
- enam.$O\
- ldelf.$O\
- ldmacho.$O\
- ldpe.$O\
- lib.$O\
- list.$O\
- noop.$O\
- obj.$O\
- optab.$O\
- pass.$O\
- prof.$O\
- softfloat.$O\
- span.$O\
- symtab.$O\
- go.$O\
-
-HFILES=\
- l.h\
- 5.out.h\
- ../ld/elf.h\
-
-include ../../Make.ctool
-
-enam.c: 5.out.h
- sh mkenam
-
-CLEANFILES+=enam.c
-
-%.$O: ../ld/%.c
- $(HOST_CC) $(HOST_CFLAGS) -I. ../ld/$*.c
+include ../../Make.dist
diff --git a/src/cmd/6a/Makefile b/src/cmd/6a/Makefile
index d7c1f235df..538ffb1a76 100644
--- a/src/cmd/6a/Makefile
+++ b/src/cmd/6a/Makefile
@@ -1,25 +1,10 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
+include ../../Make.dist
-TARG=6a
+install: y.tab.h
-HFILES=\
- a.h\
- y.tab.h\
- ../6l/6.out.h\
-
-OFILES=\
- y.tab.$O\
- lex.$O\
- ../6l/enam.$O\
-
-YFILES=\
- a.y\
-
-include ../../Make.ctool
-
-lex.$O: ../cc/macbody ../cc/lexbody
+y.tab.h: a.y
+ LANG=C LANGUAGE=en_US.UTF8 bison -v -y a.y
diff --git a/src/cmd/6c/Makefile b/src/cmd/6c/Makefile
index 169a080d51..3f528d7517 100644
--- a/src/cmd/6c/Makefile
+++ b/src/cmd/6c/Makefile
@@ -1,36 +1,5 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
-
-TARG=6c
-
-HFILES=\
- gc.h\
- ../6l/6.out.h\
- ../cc/cc.h\
-
-OFILES=\
- cgen.$O\
- list.$O\
- sgen.$O\
- swt.$O\
- txt.$O\
- pgen.$O\
- pswt.$O\
- div.$O\
- mul.$O\
- reg.$O\
- peep.$O\
- machcap.$O\
- ../6l/enam.$O\
-
-LIB=\
- ../cc/cc.a$O\
-
-include ../../Make.ctool
-
-%.$O: ../cc/%.c
- $(HOST_CC) $(HOST_CFLAGS) -I. -o $@ ../cc/$*.c
+include ../../Make.dist
diff --git a/src/cmd/6g/Makefile b/src/cmd/6g/Makefile
index 43e375174e..3f528d7517 100644
--- a/src/cmd/6g/Makefile
+++ b/src/cmd/6g/Makefile
@@ -1,35 +1,5 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
-
-TARG=6g
-
-HFILES=\
- ../gc/go.h\
- ../6l/6.out.h\
- gg.h\
- opt.h\
-
-OFILES=\
- ../6l/enam.$O\
- cgen.$O\
- cplx.$O\
- galign.$O\
- ggen.$O\
- gobj.$O\
- gsubr.$O\
- list.$O\
- peep.$O\
- pgen.$O\
- reg.$O\
-
-LIB=\
- ../gc/gc.a$O\
-
-include ../../Make.ctool
-
-%.$O: ../gc/%.c
- $(HOST_CC) $(HOST_CFLAGS) -I. -o $@ ../gc/$*.c
+include ../../Make.dist
diff --git a/src/cmd/6l/Makefile b/src/cmd/6l/Makefile
index 43ad9cad03..3f528d7517 100644
--- a/src/cmd/6l/Makefile
+++ b/src/cmd/6l/Makefile
@@ -1,48 +1,5 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
-
-TARG=6l
-
-OFILES=\
- asm.$O\
- data.$O\
- dwarf.$O\
- elf.$O\
- enam.$O\
- go.$O\
- ldelf.$O\
- ldmacho.$O\
- ldpe.$O\
- lib.$O\
- list.$O\
- macho.$O\
- obj.$O\
- optab.$O\
- pass.$O\
- pe.$O\
- prof.$O\
- span.$O\
- symtab.$O\
-
-HFILES=\
- l.h\
- 6.out.h\
- ../ld/lib.h\
- ../ld/elf.h\
- ../ld/macho.h\
- ../ld/dwarf.h\
- ../ld/pe.h\
-
-include ../../Make.ctool
-
-enam.c: 6.out.h
- sh mkenam
-
-CLEANFILES+=enam.c
-
-%.$O: ../ld/%.c
- $(HOST_CC) $(HOST_CFLAGS) -I. ../ld/$*.c
+include ../../Make.dist
diff --git a/src/cmd/8a/Makefile b/src/cmd/8a/Makefile
index afa8441a4c..538ffb1a76 100644
--- a/src/cmd/8a/Makefile
+++ b/src/cmd/8a/Makefile
@@ -1,25 +1,10 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
+include ../../Make.dist
-TARG=8a
+install: y.tab.h
-HFILES=\
- a.h\
- y.tab.h\
- ../8l/8.out.h\
-
-OFILES=\
- y.tab.$O\
- lex.$O\
- ../8l/enam.$O\
-
-YFILES=\
- a.y\
-
-include ../../Make.ctool
-
-lex.$O: ../cc/macbody ../cc/lexbody
+y.tab.h: a.y
+ LANG=C LANGUAGE=en_US.UTF8 bison -v -y a.y
diff --git a/src/cmd/8c/Makefile b/src/cmd/8c/Makefile
index 22ffedad8c..3f528d7517 100644
--- a/src/cmd/8c/Makefile
+++ b/src/cmd/8c/Makefile
@@ -1,37 +1,5 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
-
-TARG=8c
-
-HFILES=\
- gc.h\
- ../8l/8.out.h\
- ../cc/cc.h\
-
-OFILES=\
- cgen.$O\
- cgen64.$O\
- div.$O\
- list.$O\
- machcap.$O\
- mul.$O\
- pgen.$O\
- pswt.$O\
- peep.$O\
- reg.$O\
- sgen.$O\
- swt.$O\
- txt.$O\
- ../8l/enam.$O\
-
-LIB=\
- ../cc/cc.a$O\
-
-include ../../Make.ctool
-
-%.$O: ../cc/%.c
- $(HOST_CC) $(HOST_CFLAGS) -I. -o $@ ../cc/$*.c
+include ../../Make.dist
diff --git a/src/cmd/8g/Makefile b/src/cmd/8g/Makefile
index 1422d07cc2..3f528d7517 100644
--- a/src/cmd/8g/Makefile
+++ b/src/cmd/8g/Makefile
@@ -1,36 +1,5 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
-
-TARG=8g
-
-HFILES=\
- ../gc/go.h\
- ../8l/8.out.h\
- gg.h\
- opt.h\
-
-OFILES=\
- ../8l/enam.$O\
- cgen.$O\
- cgen64.$O\
- cplx.$O\
- galign.$O\
- ggen.$O\
- gobj.$O\
- gsubr.$O\
- list.$O\
- peep.$O\
- pgen.$O\
- reg.$O\
-
-LIB=\
- ../gc/gc.a$O\
-
-include ../../Make.ctool
-
-%.$O: ../gc/%.c
- $(HOST_CC) $(HOST_CFLAGS) -I. -o $@ ../gc/$*.c
+include ../../Make.dist
diff --git a/src/cmd/8l/Makefile b/src/cmd/8l/Makefile
index 7e9bd7797f..3f528d7517 100644
--- a/src/cmd/8l/Makefile
+++ b/src/cmd/8l/Makefile
@@ -1,49 +1,5 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
-
-TARG=8l
-
-OFILES=\
- asm.$O\
- data.$O\
- dwarf.$O\
- elf.$O\
- enam.$O\
- go.$O\
- ldelf.$O\
- ldmacho.$O\
- ldpe.$O\
- lib.$O\
- list.$O\
- macho.$O\
- obj.$O\
- optab.$O\
- pass.$O\
- pe.$O\
- prof.$O\
- span.$O\
- symtab.$O\
-
-
-HFILES=\
- l.h\
- 8.out.h\
- ../ld/dwarf.h\
- ../ld/elf.h\
- ../ld/macho.h\
- ../ld/pe.h\
-
-include ../../Make.ctool
-
-enam.c: 8.out.h
- sh mkenam
-
-CLEANFILES+=enam.c
-
-
-%.$O: ../ld/%.c
- $(HOST_CC) $(HOST_CFLAGS) -I. ../ld/$*.c
+include ../../Make.dist
diff --git a/src/cmd/Makefile b/src/cmd/Makefile
deleted file mode 100644
index 31be2d12b7..0000000000
--- a/src/cmd/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 2011 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.
-
-include ../Make.inc
-
-all: install
-
-# Only build tools for current architecture, and only tools written in C.
-# The tools written in Go are managed by ../pkg/Makefile.
-DIRS=\
- $(O)a\
- $(O)c\
- $(O)g\
- $(O)l\
- cc\
- cov\
- gc\
- nm\
- pack\
- prof\
-
-# Clean applies to all directories, even for other architectures.
-CLEANDIRS=\
- $(DIRS)\
- 5a\
- 5c\
- 5g\
- 5l\
- 6a\
- 6c\
- 6g\
- 6l\
- 8a\
- 8c\
- 8g\
- 8l\
-
-install: $(patsubst %,%.install,$(DIRS))
-clean: $(patsubst %,%.clean,$(CLEANDIRS))
-nuke: $(patsubst %,%.nuke,$(CLEANDIRS))
-
-%.install:
- @echo
- @echo %%%% making $* %%%%
- @echo
- $(MAKE) -C $* install
-
-gc.install 5c.install 6c.install 8c.install: cc.install
-$(O)g.install: gc.install
-$(O)a.install $(O)c.install $(O)g.install: $(O)l.install
-
-%.clean:
- $(MAKE) -C $* clean
-
-%.nuke:
- $(MAKE) -C $* nuke
-
-echo-dirs:
- @echo $(DIRS)
diff --git a/src/cmd/cc/Makefile b/src/cmd/cc/Makefile
index 737af1f42d..8cfd64cd66 100644
--- a/src/cmd/cc/Makefile
+++ b/src/cmd/cc/Makefile
@@ -1,36 +1,10 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
+include ../../Make.dist
-LIB=cc.a$O
+install: y.tab.h
-HFILES=\
- cc.h\
- y.tab.h\
-
-YFILES=\
- cc.y\
-
-OFILES=\
- y.tab.$O\
- lex.$O\
- mac.$O\
- dcl.$O\
- acid.$O\
- godefs.$O\
- bits.$O\
- com.$O\
- scon.$O\
- funct.$O\
- sub.$O\
- com64.$O\
- dpchk.$O\
- omachcap.$O\
-
-NOINSTALL=1
-include ../../Make.clib
-
-install: $(LIB)
+y.tab.h: cc.y
+ LANG=C LANGUAGE=en_US.UTF8 bison -v -y a.y
diff --git a/src/cmd/cov/Makefile b/src/cmd/cov/Makefile
index 3d0cf12041..3f528d7517 100644
--- a/src/cmd/cov/Makefile
+++ b/src/cmd/cov/Makefile
@@ -1,41 +1,5 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
-
-# The directory is cov because the source is portable and general.
-# We call the binary 6cov to avoid confusion and because this binary
-# is linked only with amd64 and x86 support.
-
-TARG=cov
-OFILES=\
- main.$O\
- tree.$O\
-
-HFILES=\
- tree.h\
-
-NOINSTALL=1
-include ../../Make.ctool
-
-ifeq ($(GOOS),windows)
-NAME=windows
-else
-NAME=$(shell uname | tr A-Z a-z)
-endif
-
-install: install-$(NAME)
-install-linux: install-default
-install-freebsd: install-default
-install-netbsd: install-default
-install-openbsd: install-default
-install-windows: install-default
-
-# on Darwin, have to install and setgid; see $GOROOT/src/sudo.bash
-install-darwin: $(TARG)
- @true
-
-install-default: $(TARG)
- cp $(TARG) "$(GOROOT)"/bin/tool/$(TARG)
+include ../../Make.dist
diff --git a/src/cmd/gc/Makefile b/src/cmd/gc/Makefile
index b105a69f64..df34c05b27 100644
--- a/src/cmd/gc/Makefile
+++ b/src/cmd/gc/Makefile
@@ -1,66 +1,10 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
+include ../../Make.dist
-LIB=gc.a$O
-
-HFILES=\
- go.h\
- y.tab.h\
- md5.h\
-
-OFILES=\
- align.$O\
- bits.$O\
- builtin.$O\
- closure.$O\
- const.$O\
- dcl.$O\
- esc.$O\
- export.$O\
- fmt.$O\
- gen.$O\
- init.$O\
- inl.$O\
- lex.$O\
- md5.$O\
- mparith1.$O\
- mparith2.$O\
- mparith3.$O\
- obj.$O\
- order.$O\
- range.$O\
- reflect.$O\
- select.$O\
- sinit.$O\
- subr.$O\
- swt.$O\
- typecheck.$O\
- unsafe.$O\
- walk.$O\
- y.tab.$O\
-
-HOST_CFLAGS+=-DGOEXPERIMENT='"$(GOEXPERIMENT)"'
-
-NOINSTALL=1
-include ../../Make.clib
-
-install: $(LIB)
-
-subr.$O: yerr.h
-
-fmt.$O: opnames.h
-
-opnames.h: mkopnames go.h
- ./mkopnames go.h >opnames.h
-
-CLEANFILES+=*.[568] [568].out mkbuiltin1 _builtin.c opnames.h
-
-mkbuiltin1: mkbuiltin1.$O
- $(HOST_LD) -o $@ mkbuiltin1.$O -L"$(GOROOT)"/lib -lbio -l9 -lm $(HOST_LDFLAGS)
+install: y.tab.h builtin.c
y.tab.h: go.y
bison -v -y -d go.y
@@ -69,6 +13,5 @@ y.tab.h: go.y
mv y1.tab.c y.tab.c
awk -f bisonerrors y.output go.errors >yerr.h
-yerr.h: y.tab.h
- test -f yerr.h && touch yerr.h
-
+builtin.c: runtime.go unsafe.go
+ ./mkbuiltin
diff --git a/src/cmd/nm/Makefile b/src/cmd/nm/Makefile
index f2a89d83f5..3f528d7517 100644
--- a/src/cmd/nm/Makefile
+++ b/src/cmd/nm/Makefile
@@ -1,15 +1,5 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
-
-# The directory is nm because the source is portable and general.
-# We call the binary 6nm to avoid confusion with the host nm.
-
-TARG=nm
-OFILES=\
- nm.$O\
-
-include ../../Make.ctool
+include ../../Make.dist
diff --git a/src/cmd/pack/Makefile b/src/cmd/pack/Makefile
index 12909727fc..3f528d7517 100644
--- a/src/cmd/pack/Makefile
+++ b/src/cmd/pack/Makefile
@@ -1,12 +1,5 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
-
-TARG=pack
-OFILES=\
- ar.$O\
-
-include ../../Make.ctool
+include ../../Make.dist
diff --git a/src/cmd/prof/Makefile b/src/cmd/prof/Makefile
index 8423f850f8..3f528d7517 100644
--- a/src/cmd/prof/Makefile
+++ b/src/cmd/prof/Makefile
@@ -1,38 +1,5 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../../Make.inc
-O:=$(HOST_O)
-
-# This binary is linked only with amd64 and x86 support.
-
-TARG=prof
-OFILES=\
- main.$O\
-
-NOINSTALL=1
-include ../../Make.ctool
-
-ifeq ($(GOOS),windows)
-NAME=windows
-else
-NAME=$(shell uname | tr A-Z a-z)
-endif
-
-install: install-$(NAME) install-pprof
-install-linux: install-default
-install-freebsd: install-default
-install-netbsd: install-default
-install-openbsd: install-default
-install-windows: install-default
-
-# on Darwin, have to install and setgid; see $GOROOT/src/sudo.bash
-install-darwin: $(TARG)
- @true
-
-install-default: $(TARG)
- cp $(TARG) "$(GOROOT)"/bin/tool/$(TARG)
-
-install-pprof: pprof
- cp pprof "$(GOROOT)"/bin/tool/pprof
+include ../../Make.dist
diff --git a/src/lib9/Makefile b/src/lib9/Makefile
index 8667c8f359..62aba5dca7 100644
--- a/src/lib9/Makefile
+++ b/src/lib9/Makefile
@@ -1,122 +1,5 @@
-# Copyright 2009 The Go Authors. All rights reserved.
+# 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.
-include ../Make.inc
-O:=$(HOST_O)
-
-LIB=lib9.a
-
-NUM=\
- charstod.$O\
- pow10.$O\
-
-# Could add fmt/errfmt, but we want to pick it up from ./errstr.c instead.
-FMTOFILES=\
- dofmt.$O\
- fltfmt.$O\
- fmt.$O\
- fmtfd.$O\
- fmtfdflush.$O\
- fmtlocale.$O\
- fmtlock2.$O\
- fmtnull.$O\
- fmtprint.$O\
- fmtquote.$O\
- fmtrune.$O\
- fmtstr.$O\
- fmtvprint.$O\
- fprint.$O\
- nan64.$O\
- print.$O\
- seprint.$O\
- smprint.$O\
- snprint.$O\
- sprint.$O\
- strtod.$O\
- vfprint.$O\
- vseprint.$O\
- vsmprint.$O\
- vsnprint.$O\
- $(NUM)\
-
-UTFOFILES=\
- rune.$O\
- utfecpy.$O\
- utflen.$O\
- utfnlen.$O\
- utfrrune.$O\
- utfrune.$O\
- utfutf.$O\
- runetype.$O\
-
-LIB9OFILES=\
- _p9dir.$O\
- _exits.$O\
- argv0.$O\
- atoi.$O\
- cleanname.$O\
- create.$O\
- ctime.$O\
- dirfstat.$O\
- dirfwstat.$O\
- dirstat.$O\
- dirwstat.$O\
- dup.$O\
- errstr.$O\
- exec.$O\
- execl.$O\
- exitcode.$O\
- exits.$O\
- getenv.$O\
- getfields.$O\
- getwd.$O\
- goos.$O\
- main.$O\
- nan.$O\
- nulldir.$O\
- open.$O\
- readn.$O\
- seek.$O\
- strecpy.$O\
- sysfatal.$O\
- time.$O\
- tokenize.$O\
-
-ifeq ($(GOHOSTOS),windows)
-LIB9OFILES+=\
- windows.$O\
-
-else
-LIB9OFILES+=\
- await.$O\
- getuser.$O\
- jmp.$O\
- notify.$O\
- rfork.$O\
-
-endif
-
-OFILES=\
- $(LIB9OFILES)\
- $(FMTOFILES)\
- $(UTFOFILES)\
-
-HFILES=\
- $(QUOTED_GOROOT)/include/u.h\
- $(QUOTED_GOROOT)/include/libc.h\
-
-include ../Make.clib
-
-GOROOT_FINAL?=$(GOROOT)
-
-%.$O: fmt/%.c
- $(HOST_CC) $(HOST_CFLAGS) -DPLAN9PORT -Ifmt $<
-
-%.$O: utf/%.c
- $(HOST_CC) $(HOST_CFLAGS) $<
-
-goos.$O: goos.c
- GOVERSION=`../version.bash` && \
- $(HOST_CC) $(HOST_CFLAGS) -DGOOS='"$(GOOS)"' -DGOARCH='"$(GOARCH)"' -DGOROOT='"$(GOROOT_FINAL)"' -DGOVERSION='"'"$$GOVERSION"'"' $<
-
+include ../Make.dist
diff --git a/src/libbio/Makefile b/src/libbio/Makefile
index 4340b0eae8..62aba5dca7 100644
--- a/src/libbio/Makefile
+++ b/src/libbio/Makefile
@@ -1,51 +1,5 @@
-# Derived from http://code.google.com/p/inferno-os/source/browse/libbio/mkfile
-#
-# Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
-# Revisions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com). All rights reserved.
-# Portions Copyright © 2009 The Go Authors. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
+# 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.
-include ../Make.inc
-O:=$(HOST_O)
-
-LIB=libbio.a
-
-OFILES=\
- bbuffered.$O\
- bfildes.$O\
- bflush.$O\
- bgetc.$O\
- bgetrune.$O\
- bgetd.$O\
- binit.$O\
- boffset.$O\
- bprint.$O\
- bputc.$O\
- bputrune.$O\
- brdline.$O\
- brdstr.$O\
- bread.$O\
- bseek.$O\
- bwrite.$O\
-
-HFILES=\
- ../../include/bio.h
-
-include ../Make.clib
+include ../Make.dist
diff --git a/src/libmach/Makefile b/src/libmach/Makefile
index 7473204de0..62aba5dca7 100644
--- a/src/libmach/Makefile
+++ b/src/libmach/Makefile
@@ -1,64 +1,5 @@
-# Derived from Inferno libmach/mkfile
-# http://code.google.com/p/inferno-os/source/browse/utils/libmach/mkfile
-#
-# Copyright © 1994-1999 Lucent Technologies Inc.
-# Power PC support Copyright © 1995-2004 C H Forsyth (forsyth@terzarima.net).
-# Portions Copyright © 1997-1999 Vita Nuova Limited.
-# Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).
-# Revisions Copyright © 2000-2004 Lucent Technologies Inc. and others.
-# Portions Copyright © 2009 The Go Authors. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
+# 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.
-include ../Make.inc
-O:=$(HOST_O)
-
-LIB=libmach.a
-OFILES=\
- executable.$O\
- fakeobj.$O\
- map.$O\
- obj.$O\
- swap.$O\
- sym.$O\
- access.$O\
- machdata.$O\
- setmach.$O\
- 5.$O\
- 6.$O\
- 8.$O\
- 5db.$O\
- 8db.$O\
- 5obj.$O\
- 6obj.$O\
- 8obj.$O\
-
-ifneq ($(GOHOSTOS),)
-OFILES+=\
- $(GOHOSTOS).$O\
-
-else
-OFILES+=\
- $(shell uname | tr A-Z a-z).$O\
-
-endif
-
-HFILES=../../include/mach.h elf.h macho.h obj.h
-
-include ../Make.clib
+include ../Make.dist
diff --git a/src/pkg/unicode/Makefile b/src/pkg/unicode/Makefile
index 91eb3c45da..33b06ca10d 100644
--- a/src/pkg/unicode/Makefile
+++ b/src/pkg/unicode/Makefile
@@ -2,8 +2,6 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-include ../../Make.inc
-
maketables: maketables.go
go build maketables.go
diff --git a/src/quietgcc.bash b/src/quietgcc.bash
deleted file mode 100755
index 759f6b407c..0000000000
--- a/src/quietgcc.bash
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env bash
-# 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.
-
-# The master for this file is $GOROOT/src/quietgcc.bash
-# Changes made to $GOBIN/quietgcc will be overwritten.
-
-# Gcc output that we don't care to see.
-ignore=': error: .Each undeclared identifier'
-ignore=$ignore'|: error: for each function it appears'
-ignore=$ignore'|is dangerous, better use'
-ignore=$ignore'|is almost always misused'
-ignore=$ignore'|: In function '
-ignore=$ignore'|: At top level: '
-ignore=$ignore'|In file included from'
-ignore=$ignore'| from'
-
-# Figure out which cc to run; this is set by make.bash.
-gcc="@CC@"
-if test "$gcc" = "@C""C@"; then
- gcc=gcc
-fi
-
-# Build 64-bit binaries on 64-bit systems, unless GOHOSTARCH=386.
-case "$(uname -m -p)-$GOHOSTARCH" in
-*x86_64*-386 | *amd64*-386)
- gcc="$gcc -m32"
- ;;
-*x86_64* | *amd64*)
- gcc="$gcc -m64"
-esac
-
-# Run gcc, save error status, redisplay output without noise, exit with gcc status.
-tmp="${TMPDIR:-/tmp}/quietgcc.$$.$USER.out"
-$gcc -Wall -Wno-sign-compare -Wno-missing-braces \
- -Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment \
- -Werror \
- "$@" >"$tmp" 2>&1
-status=$?
-egrep -v "$ignore" "$tmp" | uniq | tee "$tmp.1"
-
-rm -f "$tmp" "$tmp.1"
-exit $status
diff --git a/src/version.bash b/src/version.bash
deleted file mode 100755
index b2dabe4f7d..0000000000
--- a/src/version.bash
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2010 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.
-
-GOROOT=$(dirname $0)/..
-
-# If a version file created by -save is available, use it
-if [ -f "$GOROOT/VERSION" -a "$1" != "-save" ]; then
- cat $GOROOT/VERSION
- exit 0
-fi
-
-# Otherwise, if hg doesn't work for whatever reason, fail
-if [ ! -d "$GOROOT/.hg" ] || ! hg version > /dev/null 2>&1; then
- echo 'Unable to report version: hg and VERSION file missing' 1>&2
- echo 'Generate VERSION with `src/version.bash -save` while hg is usable' 1>&2
- exit 2
-fi
-
-# Get numerical revision
-VERSION=$(hg identify -n 2>/dev/null)
-if [ $? != 0 ]; then
- OLD=$(hg identify | sed 1q)
- VERSION=$(echo $OLD | awk '{print $1}')
-fi
-
-# Get branch type
-BRANCH=release
-if [ "$(hg identify -b 2>/dev/null)" == "default" ]; then
- BRANCH=weekly
-fi
-
-# Find most recent known release or weekly tag.
-TAG=$(hg tags |
- grep $BRANCH |
- sed 's/:.*//' |
- sort -rn -k2 |
- awk -v ver=$VERSION '$2+0 <= ver+0 && $1~/^(release|weekly)\./ {print $1}' |
- sed -n 1p)
-
-if [ "$TAG" != "" ]; then
- VERSION="$TAG $VERSION"
-fi
-
-if [ "$1" = "-save" ]; then
- echo $VERSION > $GOROOT/VERSION
-else
- echo $VERSION
-fi