mirror of
https://github.com/golang/go.git
synced 2024-09-29 14:26:50 +00:00
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
This commit is contained in:
parent
e335ec98b5
commit
fec7fa8b9d
@ -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
|
|
||||||
|
|
@ -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
|
|
33
src/Make.cmd
33
src/Make.cmd
@ -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)
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
15
src/Make.dist
Normal file
15
src/Make.dist
Normal file
@ -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
|
177
src/Make.inc
177
src/Make.inc
@ -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:=
|
|
@ -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
|
|
@ -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
|
|
||||||
"
|
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
O:=$(HOST_O)
|
|
||||||
|
|
||||||
TARG=5a
|
install: y.tab.h
|
||||||
|
|
||||||
HFILES=\
|
y.tab.h: a.y
|
||||||
a.h\
|
LANG=C LANGUAGE=en_US.UTF8 bison -v -y a.y
|
||||||
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
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
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
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
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
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
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
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
O:=$(HOST_O)
|
|
||||||
|
|
||||||
TARG=6a
|
install: y.tab.h
|
||||||
|
|
||||||
HFILES=\
|
y.tab.h: a.y
|
||||||
a.h\
|
LANG=C LANGUAGE=en_US.UTF8 bison -v -y a.y
|
||||||
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
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
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
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
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
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
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
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
O:=$(HOST_O)
|
|
||||||
|
|
||||||
TARG=8a
|
install: y.tab.h
|
||||||
|
|
||||||
HFILES=\
|
y.tab.h: a.y
|
||||||
a.h\
|
LANG=C LANGUAGE=en_US.UTF8 bison -v -y a.y
|
||||||
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
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
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
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
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
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
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
|
|
||||||
|
@ -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)
|
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
O:=$(HOST_O)
|
|
||||||
|
|
||||||
LIB=cc.a$O
|
install: y.tab.h
|
||||||
|
|
||||||
HFILES=\
|
y.tab.h: cc.y
|
||||||
cc.h\
|
LANG=C LANGUAGE=en_US.UTF8 bison -v -y a.y
|
||||||
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)
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
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)
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
O:=$(HOST_O)
|
|
||||||
|
|
||||||
LIB=gc.a$O
|
install: y.tab.h builtin.c
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
y.tab.h: go.y
|
y.tab.h: go.y
|
||||||
bison -v -y -d go.y
|
bison -v -y -d go.y
|
||||||
@ -69,6 +13,5 @@ y.tab.h: go.y
|
|||||||
mv y1.tab.c y.tab.c
|
mv y1.tab.c y.tab.c
|
||||||
awk -f bisonerrors y.output go.errors >yerr.h
|
awk -f bisonerrors y.output go.errors >yerr.h
|
||||||
|
|
||||||
yerr.h: y.tab.h
|
builtin.c: runtime.go unsafe.go
|
||||||
test -f yerr.h && touch yerr.h
|
./mkbuiltin
|
||||||
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
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
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
O:=$(HOST_O)
|
|
||||||
|
|
||||||
TARG=pack
|
|
||||||
OFILES=\
|
|
||||||
ar.$O\
|
|
||||||
|
|
||||||
include ../../Make.ctool
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
include ../../Make.dist
|
||||||
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
|
|
||||||
|
@ -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
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../Make.inc
|
include ../Make.dist
|
||||||
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"'"' $<
|
|
||||||
|
|
||||||
|
@ -1,51 +1,5 @@
|
|||||||
# Derived from http://code.google.com/p/inferno-os/source/browse/libbio/mkfile
|
# Copyright 2012 The Go Authors. All rights reserved.
|
||||||
#
|
# Use of this source code is governed by a BSD-style
|
||||||
# Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
|
# license that can be found in the LICENSE file.
|
||||||
# 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.
|
|
||||||
|
|
||||||
include ../Make.inc
|
include ../Make.dist
|
||||||
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
|
|
||||||
|
@ -1,64 +1,5 @@
|
|||||||
# Derived from Inferno libmach/mkfile
|
# Copyright 2012 The Go Authors. All rights reserved.
|
||||||
# http://code.google.com/p/inferno-os/source/browse/utils/libmach/mkfile
|
# Use of this source code is governed by a BSD-style
|
||||||
#
|
# license that can be found in the LICENSE file.
|
||||||
# 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.
|
|
||||||
|
|
||||||
include ../Make.inc
|
include ../Make.dist
|
||||||
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
|
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
include ../../Make.inc
|
|
||||||
|
|
||||||
maketables: maketables.go
|
maketables: maketables.go
|
||||||
go build maketables.go
|
go build maketables.go
|
||||||
|
|
||||||
|
@ -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
|
|
@ -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
|
|
Loading…
Reference in New Issue
Block a user