]> Cypherpunks repositories - gostls13.git/commitdiff
build: delete make paraphernalia
authorRuss Cox <rsc@golang.org>
Mon, 6 Feb 2012 18:34:25 +0000 (13:34 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 6 Feb 2012 18:34:25 +0000 (13:34 -0500)
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

34 files changed:
src/Make.ccmd [deleted file]
src/Make.clib [deleted file]
src/Make.cmd [deleted file]
src/Make.common [deleted file]
src/Make.ctool [deleted file]
src/Make.dist [new file with mode: 0644]
src/Make.inc [deleted file]
src/all-qemu.bash [deleted file]
src/buildinfo.sh [deleted file]
src/cmd/5a/Makefile
src/cmd/5c/Makefile
src/cmd/5g/Makefile
src/cmd/5l/Makefile
src/cmd/6a/Makefile
src/cmd/6c/Makefile
src/cmd/6g/Makefile
src/cmd/6l/Makefile
src/cmd/8a/Makefile
src/cmd/8c/Makefile
src/cmd/8g/Makefile
src/cmd/8l/Makefile
src/cmd/Makefile [deleted file]
src/cmd/cc/Makefile
src/cmd/cov/Makefile
src/cmd/gc/Makefile
src/cmd/nm/Makefile
src/cmd/pack/Makefile
src/cmd/prof/Makefile
src/lib9/Makefile
src/libbio/Makefile
src/libmach/Makefile
src/pkg/unicode/Makefile
src/quietgcc.bash [deleted file]
src/version.bash [deleted file]

diff --git a/src/Make.ccmd b/src/Make.ccmd
deleted file mode 100644 (file)
index ad31944..0000000
+++ /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 (file)
index d8bd8a3..0000000
+++ /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 (file)
index aacdb14..0000000
+++ /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 (file)
index 0b27d07..0000000
+++ /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 (file)
index 6898ebc..0000000
+++ /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 (file)
index 0000000..78e6edf
--- /dev/null
@@ -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 (file)
index 1b8a705..0000000
+++ /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 (executable)
index 6a659d6..0000000
+++ /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 (file)
index 4725b39..0000000
+++ /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
-"
index 9a19f197fbe68d6e32cc076f8e1eb759bd909521..538ffb1a76e1f229d148be1875b9442d4cf2678a 100644 (file)
@@ -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
index d2cddfa5221b4b70f8b6e792263877bc0de6fe7e..3f528d751750246ccfa3df22e482501702149c38 100644 (file)
@@ -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
index 647446246ba5c2add34db1e489992a23b041f367..3f528d751750246ccfa3df22e482501702149c38 100644 (file)
@@ -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
index b68190d12a027f90aca3848141cf3663104f6621..3f528d751750246ccfa3df22e482501702149c38 100644 (file)
@@ -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
index d7c1f235df38c606e969a2fcdfc1116041be7242..538ffb1a76e1f229d148be1875b9442d4cf2678a 100644 (file)
@@ -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
index 169a080d519edff07ba7bc8fad4e6d1a224f6fa3..3f528d751750246ccfa3df22e482501702149c38 100644 (file)
@@ -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
index 43e375174e6045e6ee98652c131f477873b3c37a..3f528d751750246ccfa3df22e482501702149c38 100644 (file)
@@ -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
index 43ad9cad034b9500faab56c7703b43c8cf0f4494..3f528d751750246ccfa3df22e482501702149c38 100644 (file)
@@ -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
index afa8441a4c639eabdf34b71e04de7aec43335b11..538ffb1a76e1f229d148be1875b9442d4cf2678a 100644 (file)
@@ -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
index 22ffedad8c599c135608636d431b3c093afcac0d..3f528d751750246ccfa3df22e482501702149c38 100644 (file)
@@ -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
index 1422d07cc2cff49040cdc3fcc998d8398585776c..3f528d751750246ccfa3df22e482501702149c38 100644 (file)
@@ -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
index 7e9bd7797f1a2364ab85416c279989ca2bd26d45..3f528d751750246ccfa3df22e482501702149c38 100644 (file)
@@ -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 (file)
index 31be2d1..0000000
+++ /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)
index 737af1f42da66c55f66e68a42063da11b364f0d7..8cfd64cd665f6889f03ee0358186800b9d9b693b 100644 (file)
@@ -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
index 3d0cf120418d3e0b790dbf470bb81303ab5c3f4a..3f528d751750246ccfa3df22e482501702149c38 100644 (file)
@@ -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
index b105a69f64e05796ddfcd8f33e3cee0f81d0955e..df34c05b273d0a21c2c10103d77eb054ab2afafb 100644 (file)
@@ -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
index f2a89d83f5895230506eb86d6e1c78e02ad7f274..3f528d751750246ccfa3df22e482501702149c38 100644 (file)
@@ -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
index 12909727fc1ee53535954ebf820b2e3aa8db04b7..3f528d751750246ccfa3df22e482501702149c38 100644 (file)
@@ -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
index 8423f850f8d45b9aaa0274c22563e7113254947a..3f528d751750246ccfa3df22e482501702149c38 100644 (file)
@@ -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
index 8667c8f35939c295c135dd4c0c56b31886427f97..62aba5dca70f55d17e405cabf30766131503571a 100644 (file)
@@ -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
index 4340b0eae8e84589f0d6cf91eb1f1bc82d061bbe..62aba5dca70f55d17e405cabf30766131503571a 100644 (file)
@@ -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
index 7473204de07b31d6cda1b1e76fb255d3c87bcc02..62aba5dca70f55d17e405cabf30766131503571a 100644 (file)
@@ -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
index 91eb3c45da5f3d949bd951a82dfabf9e6b14b1ad..33b06ca10de103305a323f9166f3beb9c493385d 100644 (file)
@@ -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 (executable)
index 759f6b4..0000000
+++ /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 (executable)
index b2dabe4..0000000
+++ /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