mirror of
https://github.com/golang/go
synced 2024-11-21 21:54:40 -07:00
build: $GOBIN defaults to $GOROOT/bin
R=r CC=golang-dev https://golang.org/cl/1982049
This commit is contained in:
parent
2100f57e0f
commit
aafe474ec9
4
bin/~place-holder~
Normal file
4
bin/~place-holder~
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Command binaries are installed in this directory.
|
||||||
|
|
||||||
|
Mercurial does not maintain empty directories.
|
||||||
|
This file helps.
|
36
src/Make.ccmd
Normal file
36
src/Make.ccmd
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
$(TARG): $(OFILES) $(LIB)
|
||||||
|
$(HOST_LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lbio -l9 -lm
|
||||||
|
|
||||||
|
$(OFILES): $(HFILES)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.$(HOST_O) $(TARG) $(CLEANFILES)
|
||||||
|
|
||||||
|
install: $(QUOTED_GOBIN)/$(TARG)
|
||||||
|
|
||||||
|
$(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)
|
||||||
|
|
||||||
|
%.$(HOST_O): %.c
|
||||||
|
$(HOST_CC) $(HOST_CFLAGS) -c "$(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
|
||||||
|
|
@ -8,20 +8,15 @@ endif
|
|||||||
|
|
||||||
all: $(TARG)
|
all: $(TARG)
|
||||||
|
|
||||||
# ugly hack to deal with whitespaces in $GOROOT
|
|
||||||
nullstring :=
|
|
||||||
space := $(nullstring) # a space at the end
|
|
||||||
QUOTED_GOROOT:=$(subst $(space),\ ,$(GOROOT))
|
|
||||||
|
|
||||||
include $(QUOTED_GOROOT)/src/Make.common
|
include $(QUOTED_GOROOT)/src/Make.common
|
||||||
|
|
||||||
PREREQ+=$(patsubst %,%.make,$(DEPS))
|
PREREQ+=$(patsubst %,%.make,$(DEPS))
|
||||||
|
|
||||||
$(TARG): _go_.$O $(OFILES)
|
$(TARG): _go_.$O $(OFILES)
|
||||||
$(QUOTED_GOBIN)/$(LD) -o $@ _go_.$O $(OFILES)
|
$(LD) -o $@ _go_.$O $(OFILES)
|
||||||
|
|
||||||
_go_.$O: $(GOFILES) $(PREREQ)
|
_go_.$O: $(GOFILES) $(PREREQ)
|
||||||
$(QUOTED_GOBIN)/$(GC) -o $@ $(GOFILES)
|
$(GC) -o $@ $(GOFILES)
|
||||||
|
|
||||||
install: $(QUOTED_GOBIN)/$(TARG)
|
install: $(QUOTED_GOBIN)/$(TARG)
|
||||||
|
|
||||||
|
@ -2,23 +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.
|
||||||
|
|
||||||
# GNU Make syntax:
|
|
||||||
ifndef GOBIN
|
|
||||||
GOBIN=$(HOME)/bin
|
|
||||||
endif
|
|
||||||
|
|
||||||
# ugly hack to deal with whitespaces in $GOBIN
|
|
||||||
nullstring :=
|
|
||||||
space := $(nullstring) # a space at the end
|
|
||||||
ifndef GOBIN
|
|
||||||
QUOTED_HOME=$(subst $(space),\ ,$(HOME))
|
|
||||||
GOBIN=$(QUOTED_HOME)/bin
|
|
||||||
endif
|
|
||||||
QUOTED_GOBIN=$(subst $(space),\ ,$(GOBIN))
|
|
||||||
|
|
||||||
# ugly hack to deal with whitespaces in $GOROOT
|
|
||||||
QUOTED_GOROOT:=$(subst $(space),\ ,$(GOROOT))
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf *.o *.a *.[$(OS)] [$(OS)].out $(CLEANFILES)
|
rm -rf *.o *.a *.[$(OS)] [$(OS)].out $(CLEANFILES)
|
||||||
|
|
||||||
|
@ -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.
|
|
||||||
|
|
||||||
CFLAGS=-ggdb -I"$(GOROOT)"/include -O2 -fno-inline
|
|
||||||
O=o
|
|
||||||
YFLAGS=-d
|
|
||||||
# GNU Make syntax:
|
|
||||||
nullstring :=
|
|
||||||
space := $(nullstring) # a space at the end
|
|
||||||
ifndef GOBIN
|
|
||||||
QUOTED_HOME=$(subst $(space),\ ,$(HOME))
|
|
||||||
GOBIN=$(QUOTED_HOME)/bin
|
|
||||||
endif
|
|
||||||
QUOTED_GOBIN=$(subst $(space),\ ,$(GOBIN))
|
|
||||||
|
|
||||||
CC=$(QUOTED_GOBIN)/quietgcc
|
|
||||||
LD=$(QUOTED_GOBIN)/quietgcc
|
|
||||||
PWD=$(shell pwd)
|
|
||||||
|
|
||||||
%.$O: %.c
|
|
||||||
$(CC) $(CFLAGS) -c "$(PWD)"/$*.c
|
|
@ -2,15 +2,18 @@
|
|||||||
# 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.
|
||||||
|
|
||||||
# Makefile included by all other makefiles.
|
# Makefile included by all other Go makefiles.
|
||||||
# The build converts Make.inc.in to Make.inc.
|
# The build converts Make.inc.in to Make.inc.
|
||||||
# Only make changes in Make.inc.in.
|
# Only make changes in Make.inc.in.
|
||||||
|
|
||||||
# Set up GOROOT, GOARCH, GOOS if needed.
|
# GOROOT must be set.
|
||||||
ifeq ($(GOROOT),)
|
ifeq ($(GOROOT),)
|
||||||
GOROOT:=@@GOROOT@@
|
$(error $$GOROOT is not set; use gomake or set $$GOROOT in your environment)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Set up GOROOT_FINAL, GOARCH, GOOS if needed.
|
||||||
|
GOROOT_FINAL?=$(GOROOT)
|
||||||
|
|
||||||
ifeq ($(GOOS),)
|
ifeq ($(GOOS),)
|
||||||
GOOS:=${shell uname | tr A-Z a-z}
|
GOOS:=${shell uname | tr A-Z a-z}
|
||||||
endif
|
endif
|
||||||
@ -45,9 +48,20 @@ else
|
|||||||
$(error Invalid $$GOARCH '$(GOARCH)'; must be 386, amd64, or arm)
|
$(error Invalid $$GOARCH '$(GOARCH)'; must be 386, amd64, or arm)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Save for recursive make.
|
# Save for recursive make to avoid recomputing.
|
||||||
export GOARCH GOOS
|
export GOARCH GOOS
|
||||||
|
|
||||||
|
# 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=${O}a
|
AS=${O}a
|
||||||
CC=${O}c
|
CC=${O}c
|
||||||
GC=${O}g
|
GC=${O}g
|
||||||
@ -55,6 +69,13 @@ LD=${O}l
|
|||||||
OS=568vq
|
OS=568vq
|
||||||
CFLAGS=-FVw
|
CFLAGS=-FVw
|
||||||
|
|
||||||
|
HOST_CC=quietgcc
|
||||||
|
HOST_LD=quietgcc
|
||||||
|
HOST_O=o
|
||||||
|
HOST_YFLAGS=-d
|
||||||
|
HOST_CFLAGS=-ggdb -I"$(GOROOT)/include" -O2 -fno-inline
|
||||||
|
PWD=$(shell pwd)
|
||||||
|
|
||||||
go-env:
|
go-env:
|
||||||
@echo export GOARCH=$(GOARCH)
|
@echo export GOARCH=$(GOARCH)
|
||||||
@echo export GOOS=$(GOOS)
|
@echo export GOOS=$(GOOS)
|
36
src/Make.pkg
36
src/Make.pkg
@ -6,11 +6,6 @@ all: package
|
|||||||
package: _obj/$(TARG).a
|
package: _obj/$(TARG).a
|
||||||
testpackage: _test/$(TARG).a
|
testpackage: _test/$(TARG).a
|
||||||
|
|
||||||
# ugly hack to deal with whitespaces in $GOROOT
|
|
||||||
nullstring :=
|
|
||||||
space := $(nullstring) # a space at the end
|
|
||||||
QUOTED_GOROOT:=$(subst $(space),\ ,$(GOROOT))
|
|
||||||
|
|
||||||
include $(QUOTED_GOROOT)/src/Make.common
|
include $(QUOTED_GOROOT)/src/Make.common
|
||||||
|
|
||||||
# GNU Make 3.80 has a bug in lastword
|
# GNU Make 3.80 has a bug in lastword
|
||||||
@ -42,16 +37,16 @@ endif
|
|||||||
PREREQ+=$(patsubst %,%.make,$(DEPS))
|
PREREQ+=$(patsubst %,%.make,$(DEPS))
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
$(QUOTED_GOBIN)/gotest
|
gotest
|
||||||
$(QUOTED_GOBIN)/6cov -g $(shell pwd) $O.out | grep -v '_test\.go:'
|
6cov -g $(shell pwd) $O.out | grep -v '_test\.go:'
|
||||||
|
|
||||||
CLEANFILES+=*.cgo1.go *.cgo2.c _cgo_defun.c _cgo_gotypes.go _cgo_export.* *.so _obj _test _testmain.go
|
CLEANFILES+=*.cgo1.go *.cgo2.c _cgo_defun.c _cgo_gotypes.go _cgo_export.* *.so _obj _test _testmain.go
|
||||||
|
|
||||||
test:
|
test:
|
||||||
$(QUOTED_GOBIN)/gotest
|
gotest
|
||||||
|
|
||||||
bench:
|
bench:
|
||||||
$(QUOTED_GOBIN)/gotest -benchmarks=. -match="Do not run tests"
|
gotest -benchmarks=. -match="Do not run tests"
|
||||||
|
|
||||||
nuke: clean
|
nuke: clean
|
||||||
rm -f $(pkgdir)/$(TARG).a
|
rm -f $(pkgdir)/$(TARG).a
|
||||||
@ -66,20 +61,20 @@ $(pkgdir)/$(TARG).a: _obj/$(TARG).a
|
|||||||
cp _obj/$(TARG).a "$@"
|
cp _obj/$(TARG).a "$@"
|
||||||
|
|
||||||
_go_.$O: $(GOFILES) $(PREREQ)
|
_go_.$O: $(GOFILES) $(PREREQ)
|
||||||
$(QUOTED_GOBIN)/$(GC) -o $@ $(GOFILES)
|
$(GC) -o $@ $(GOFILES)
|
||||||
|
|
||||||
_gotest_.$O: $(GOFILES) $(GOTESTFILES) $(PREREQ)
|
_gotest_.$O: $(GOFILES) $(GOTESTFILES) $(PREREQ)
|
||||||
$(QUOTED_GOBIN)/$(GC) -o $@ $(GOFILES) $(GOTESTFILES)
|
$(GC) -o $@ $(GOFILES) $(GOTESTFILES)
|
||||||
|
|
||||||
_obj/$(TARG).a: _go_.$O $(OFILES)
|
_obj/$(TARG).a: _go_.$O $(OFILES)
|
||||||
@mkdir -p _obj/$(dir)
|
@mkdir -p _obj/$(dir)
|
||||||
rm -f _obj/$(TARG).a
|
rm -f _obj/$(TARG).a
|
||||||
$(QUOTED_GOBIN)/gopack grc $@ _go_.$O $(OFILES)
|
gopack grc $@ _go_.$O $(OFILES)
|
||||||
|
|
||||||
_test/$(TARG).a: _gotest_.$O $(OFILES)
|
_test/$(TARG).a: _gotest_.$O $(OFILES)
|
||||||
@mkdir -p _test/$(dir)
|
@mkdir -p _test/$(dir)
|
||||||
rm -f _test/$(TARG).a
|
rm -f _test/$(TARG).a
|
||||||
$(QUOTED_GOBIN)/gopack grc $@ _gotest_.$O $(OFILES)
|
gopack grc $@ _gotest_.$O $(OFILES)
|
||||||
|
|
||||||
importpath:
|
importpath:
|
||||||
@echo $(TARG)
|
@echo $(TARG)
|
||||||
@ -108,7 +103,7 @@ dir:
|
|||||||
#
|
#
|
||||||
|
|
||||||
_cgo_defun.c _cgo_gotypes.go _cgo_export.c _cgo_export.h: $(CGOFILES)
|
_cgo_defun.c _cgo_gotypes.go _cgo_export.c _cgo_export.h: $(CGOFILES)
|
||||||
CGOPKGPATH=$(dir) $(QUOTED_GOBIN)/cgo -- $(CGO_CFLAGS) $(CGOFILES)
|
CGOPKGPATH=$(dir) cgo -- $(CGO_CFLAGS) $(CGOFILES)
|
||||||
|
|
||||||
# Ugly but necessary
|
# Ugly but necessary
|
||||||
%.cgo1.go: _cgo_defun.c _cgo_gotypes.go
|
%.cgo1.go: _cgo_defun.c _cgo_gotypes.go
|
||||||
@ -118,10 +113,10 @@ _cgo_defun.c _cgo_gotypes.go _cgo_export.c _cgo_export.h: $(CGOFILES)
|
|||||||
@true
|
@true
|
||||||
|
|
||||||
%.cgo2.o: %.cgo2.c
|
%.cgo2.o: %.cgo2.c
|
||||||
gcc $(_CGO_CFLAGS_$(GOARCH)) -fPIC -O2 -o $@ -c $(CGO_CFLAGS) $*.cgo2.c
|
$(HOST_CC) $(_CGO_CFLAGS_$(GOARCH)) -fPIC -O2 -o $@ -c $(CGO_CFLAGS) $*.cgo2.c
|
||||||
|
|
||||||
_cgo_export.o: _cgo_export.c _cgo_export.h
|
_cgo_export.o: _cgo_export.c _cgo_export.h
|
||||||
gcc $(_CGO_CFLAGS_$(GOARCH)) -fPIC -O2 -o $@ -c $(CGO_CFLAGS) _cgo_export.c
|
$(HOST_CC) $(_CGO_CFLAGS_$(GOARCH)) -fPIC -O2 -o $@ -c $(CGO_CFLAGS) _cgo_export.c
|
||||||
|
|
||||||
# The rules above added x.cgo1.go and _cgo_gotypes.go to $(GOFILES),
|
# The rules above added x.cgo1.go and _cgo_gotypes.go to $(GOFILES),
|
||||||
# added _cgo_defun.$O to $OFILES, and added the installed copy of
|
# added _cgo_defun.$O to $OFILES, and added the installed copy of
|
||||||
@ -137,15 +132,14 @@ _CGO_LDFLAGS_freebsd=-shared -lpthread -lm
|
|||||||
_CGO_LDFLAGS_linux=-shared -lpthread -lm
|
_CGO_LDFLAGS_linux=-shared -lpthread -lm
|
||||||
_CGO_LDFLAGS_darwin=-dynamiclib -Wl,-undefined,dynamic_lookup
|
_CGO_LDFLAGS_darwin=-dynamiclib -Wl,-undefined,dynamic_lookup
|
||||||
|
|
||||||
|
|
||||||
# Compile x.cgo4.c with gcc to make package_x.so.
|
# Compile x.cgo4.c with gcc to make package_x.so.
|
||||||
|
|
||||||
# Compile _cgo_defun.c with 6c; needs access to the runtime headers.
|
# Compile _cgo_defun.c with 6c; needs access to the runtime headers.
|
||||||
_cgo_defun.$O: _cgo_defun.c
|
_cgo_defun.$O: _cgo_defun.c
|
||||||
$(QUOTED_GOBIN)/$(CC) $(CFLAGS) $(RUNTIME_CFLAGS) _cgo_defun.c
|
$(CC) $(CFLAGS) $(RUNTIME_CFLAGS) _cgo_defun.c
|
||||||
|
|
||||||
_cgo_.so: $(GCC_OFILES) $(CGO_DEPS)
|
_cgo_.so: $(GCC_OFILES) $(CGO_DEPS)
|
||||||
gcc $(_CGO_CFLAGS_$(GOARCH)) -o $@ $(GCC_OFILES) $(CGO_LDFLAGS) $(_CGO_LDFLAGS_$(GOOS))
|
$(HOST_CC) $(_CGO_CFLAGS_$(GOARCH)) -o $@ $(GCC_OFILES) $(CGO_LDFLAGS) $(_CGO_LDFLAGS_$(GOOS))
|
||||||
|
|
||||||
$(pkgdir)/$(CGOTARG).so: _cgo_.so
|
$(pkgdir)/$(CGOTARG).so: _cgo_.so
|
||||||
@test -d $(QUOTED_GOROOT)/pkg && mkdir -p $(pkgdir)/$(dir)
|
@test -d $(QUOTED_GOROOT)/pkg && mkdir -p $(pkgdir)/$(dir)
|
||||||
@ -155,10 +149,10 @@ $(pkgdir)/$(CGOTARG).so: _cgo_.so
|
|||||||
# These come last so that the rules above can override them
|
# These come last so that the rules above can override them
|
||||||
# for more specific file names.
|
# for more specific file names.
|
||||||
%.$O: %.c
|
%.$O: %.c
|
||||||
$(QUOTED_GOBIN)/$(CC) $(CFLAGS) $*.c
|
$(CC) $(CFLAGS) $*.c
|
||||||
|
|
||||||
%.$O: %.s
|
%.$O: %.s
|
||||||
$(QUOTED_GOBIN)/$(AS) $*.s
|
$(AS) $*.s
|
||||||
|
|
||||||
%.$O: $(HFILES)
|
%.$O: $(HFILES)
|
||||||
|
|
||||||
|
@ -9,6 +9,6 @@ if [ ! -f make.bash ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
. ./make.bash
|
. ./make.bash
|
||||||
bash run.bash --no-rebuild
|
bash run.bash --no-env --no-rebuild
|
||||||
installed # function defined by make.bash
|
installed # function defined by make.bash
|
||||||
|
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
TARG=\
|
TARG=\
|
||||||
5a\
|
5a\
|
||||||
@ -15,26 +16,11 @@ HFILES=\
|
|||||||
OFILES=\
|
OFILES=\
|
||||||
y.tab.$O\
|
y.tab.$O\
|
||||||
lex.$O\
|
lex.$O\
|
||||||
# ../5l/enam.$O\
|
../5l/enam.$O\
|
||||||
|
|
||||||
YFILES=\
|
YFILES=\
|
||||||
a.y\
|
a.y\
|
||||||
|
|
||||||
$(TARG): $(OFILES)
|
include ../../Make.ccmd
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lbio -l9
|
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
|
||||||
lex.$O: ../cc/macbody ../cc/lexbody
|
lex.$O: ../cc/macbody ../cc/lexbody
|
||||||
|
|
||||||
y.tab.h: $(YFILES)
|
|
||||||
bison -y $(YFLAGS) $(YFILES)
|
|
||||||
|
|
||||||
y.tab.c: y.tab.h
|
|
||||||
test -f y.tab.c && touch y.tab.c
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.$O $(TARG) *.5 enam.c 5.out a.out y.tab.h y.tab.c
|
|
||||||
|
|
||||||
install: $(TARG)
|
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
TARG=\
|
TARG=5c
|
||||||
5c\
|
|
||||||
|
|
||||||
HFILES=\
|
HFILES=\
|
||||||
gc.h\
|
gc.h\
|
||||||
@ -26,18 +26,9 @@ OFILES=\
|
|||||||
../5l/enam.$O\
|
../5l/enam.$O\
|
||||||
|
|
||||||
LIB=\
|
LIB=\
|
||||||
../cc/cc.a$O
|
../cc/cc.a\
|
||||||
|
|
||||||
$(TARG): $(OFILES) $(LIB)
|
include ../../Make.ccmd
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lbio -l9
|
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.$O $(TARG) *.5 enam.c 5.out a.out
|
|
||||||
|
|
||||||
install: $(TARG)
|
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
|
||||||
|
|
||||||
%.$O: ../cc/%.c
|
%.$O: ../cc/%.c
|
||||||
$(CC) $(CFLAGS) -c -I. -o $@ ../cc/$*.c
|
$(HOST_CC) $(HOST_CFLAGS) -c -I. -o $@ ../cc/$*.c
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
TARG=\
|
TARG=5g
|
||||||
5g
|
|
||||||
|
|
||||||
HFILES=\
|
HFILES=\
|
||||||
../gc/go.h\
|
../gc/go.h\
|
||||||
@ -24,15 +24,9 @@ OFILES=\
|
|||||||
cgen64.$O
|
cgen64.$O
|
||||||
|
|
||||||
LIB=\
|
LIB=\
|
||||||
../gc/gc.a$O
|
../gc/gc.a\
|
||||||
|
|
||||||
$(TARG): $(OFILES) $(LIB)
|
include ../../Make.ccmd
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lbio -l9 -lm
|
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
%.$O: ../gc/%.c
|
||||||
|
$(HOST_CC) $(HOST_CFLAGS) -c -I. -o $@ ../gc/$*.c
|
||||||
clean:
|
|
||||||
rm -f *.o $(TARG) *.5 enam.c 5.out a.out
|
|
||||||
|
|
||||||
install: $(TARG)
|
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
TARG=\
|
TARG=5l
|
||||||
5l\
|
|
||||||
|
|
||||||
OFILES=\
|
OFILES=\
|
||||||
asm.$O\
|
asm.$O\
|
||||||
@ -27,19 +27,12 @@ HFILES=\
|
|||||||
../5l/5.out.h\
|
../5l/5.out.h\
|
||||||
../ld/elf.h\
|
../ld/elf.h\
|
||||||
|
|
||||||
$(TARG): $(OFILES)
|
include ../../Make.ccmd
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lbio -l9
|
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
|
||||||
enam.c: 5.out.h
|
enam.c: 5.out.h
|
||||||
sh mkenam
|
sh mkenam
|
||||||
|
|
||||||
clean:
|
CLEANFILES+=enam.c
|
||||||
rm -f *.o $(TARG) *.5 enam.c 5.out a.out
|
|
||||||
|
|
||||||
install: $(TARG)
|
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
|
||||||
|
|
||||||
%.$O: ../ld/%.c
|
%.$O: ../ld/%.c
|
||||||
$(CC) $(CFLAGS) -c -I. ../ld/$*.c
|
$(HOST_CC) $(HOST_CFLAGS) -c -I. ../ld/$*.c
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
TARG=\
|
TARG=6a
|
||||||
6a\
|
|
||||||
|
|
||||||
HFILES=\
|
HFILES=\
|
||||||
a.h\
|
a.h\
|
||||||
@ -20,21 +20,6 @@ OFILES=\
|
|||||||
YFILES=\
|
YFILES=\
|
||||||
a.y\
|
a.y\
|
||||||
|
|
||||||
$(TARG): $(OFILES)
|
include ../../Make.ccmd
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lbio -l9
|
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
|
||||||
lex.$O: ../cc/macbody ../cc/lexbody
|
lex.$O: ../cc/macbody ../cc/lexbody
|
||||||
|
|
||||||
y.tab.h: $(YFILES)
|
|
||||||
bison -y $(YFLAGS) $(YFILES)
|
|
||||||
|
|
||||||
y.tab.c: y.tab.h
|
|
||||||
test -f y.tab.c && touch y.tab.c
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.$O $(TARG) *.6 enam.c 6.out a.out y.tab.h y.tab.c
|
|
||||||
|
|
||||||
install: $(TARG)
|
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
TARG=\
|
TARG=6c
|
||||||
6c\
|
|
||||||
|
|
||||||
HFILES=\
|
HFILES=\
|
||||||
gc.h\
|
gc.h\
|
||||||
@ -28,18 +28,9 @@ OFILES=\
|
|||||||
../6l/enam.$O\
|
../6l/enam.$O\
|
||||||
|
|
||||||
LIB=\
|
LIB=\
|
||||||
../cc/cc.a$O
|
../cc/cc.a\
|
||||||
|
|
||||||
$(TARG): $(OFILES) $(LIB)
|
include ../../Make.ccmd
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lbio -l9
|
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.$O $(TARG) *.6 enam.c 6.out a.out
|
|
||||||
|
|
||||||
install: $(TARG)
|
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
|
||||||
|
|
||||||
%.$O: ../cc/%.c
|
%.$O: ../cc/%.c
|
||||||
$(CC) $(CFLAGS) -c -I. -o $@ ../cc/$*.c
|
$(HOST_CC) $(HOST_CFLAGS) -c -I. -o $@ ../cc/$*.c
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
TARG=\
|
TARG=6g
|
||||||
6g
|
|
||||||
|
|
||||||
HFILES=\
|
HFILES=\
|
||||||
../gc/go.h\
|
../gc/go.h\
|
||||||
@ -26,18 +26,9 @@ OFILES=\
|
|||||||
../6l/enam.$O\
|
../6l/enam.$O\
|
||||||
|
|
||||||
LIB=\
|
LIB=\
|
||||||
../gc/gc.a$O
|
../gc/gc.a\
|
||||||
|
|
||||||
$(TARG): $(OFILES) $(LIB)
|
include ../../Make.ccmd
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lbio -l9 -lm
|
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(TARG) enam.c 6.out a.out *.$O *.6
|
|
||||||
|
|
||||||
install: $(TARG)
|
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
|
||||||
|
|
||||||
%.$O: ../gc/%.c
|
%.$O: ../gc/%.c
|
||||||
$(CC) $(CFLAGS) -c -I. -o $@ ../gc/$*.c
|
$(HOST_CC) $(HOST_CFLAGS) -c -I. -o $@ ../gc/$*.c
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
TARG=\
|
TARG=6l
|
||||||
6l\
|
|
||||||
|
|
||||||
OFILES=\
|
OFILES=\
|
||||||
asm.$O\
|
asm.$O\
|
||||||
@ -29,19 +29,12 @@ HFILES=\
|
|||||||
../ld/macho.h\
|
../ld/macho.h\
|
||||||
../ld/dwarf.h\
|
../ld/dwarf.h\
|
||||||
|
|
||||||
$(TARG): $(OFILES)
|
include ../../Make.ccmd
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lbio -l9
|
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
|
||||||
enam.c: 6.out.h
|
enam.c: 6.out.h
|
||||||
sh mkenam
|
sh mkenam
|
||||||
|
|
||||||
clean:
|
CLEANFILES+=enam.c
|
||||||
rm -f *.$O $(TARG) *.6 enam.c 6.out a.out
|
|
||||||
|
|
||||||
install: $(TARG)
|
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
|
||||||
|
|
||||||
%.$O: ../ld/%.c
|
%.$O: ../ld/%.c
|
||||||
$(CC) $(CFLAGS) -c -I. ../ld/$*.c
|
$(HOST_CC) $(HOST_CFLAGS) -c -I. ../ld/$*.c
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
TARG=\
|
TARG=8a
|
||||||
8a\
|
|
||||||
|
|
||||||
HFILES=\
|
HFILES=\
|
||||||
a.h\
|
a.h\
|
||||||
@ -20,21 +20,6 @@ OFILES=\
|
|||||||
YFILES=\
|
YFILES=\
|
||||||
a.y\
|
a.y\
|
||||||
|
|
||||||
$(TARG): $(OFILES)
|
include ../../Make.ccmd
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lbio -l9
|
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
|
||||||
lex.$O: ../cc/macbody ../cc/lexbody
|
lex.$O: ../cc/macbody ../cc/lexbody
|
||||||
|
|
||||||
y.tab.h: $(YFILES)
|
|
||||||
bison -y $(YFLAGS) $(YFILES)
|
|
||||||
|
|
||||||
y.tab.c: y.tab.h
|
|
||||||
test -f y.tab.c && touch y.tab.c
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.$O $(TARG) *.6 enam.c 6.out a.out y.tab.h y.tab.c
|
|
||||||
|
|
||||||
install: $(TARG)
|
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
TARG=\
|
TARG=8c
|
||||||
8c\
|
|
||||||
|
|
||||||
HFILES=\
|
HFILES=\
|
||||||
gc.h\
|
gc.h\
|
||||||
@ -29,18 +29,9 @@ OFILES=\
|
|||||||
../8l/enam.$O\
|
../8l/enam.$O\
|
||||||
|
|
||||||
LIB=\
|
LIB=\
|
||||||
../cc/cc.a$O
|
../cc/cc.a\
|
||||||
|
|
||||||
$(TARG): $(OFILES) $(LIB)
|
include ../../Make.ccmd
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lm -lbio -l9
|
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.$O $(TARG) *.8 8.out a.out
|
|
||||||
|
|
||||||
install: $(TARG)
|
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
|
||||||
|
|
||||||
%.$O: ../cc/%.c
|
%.$O: ../cc/%.c
|
||||||
$(CC) $(CFLAGS) -c -I. -o $@ ../cc/$*.c
|
$(HOST_CC) $(HOST_CFLAGS) -c -I. -o $@ ../cc/$*.c
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
TARG=\
|
TARG=8g
|
||||||
8g
|
|
||||||
|
|
||||||
HFILES=\
|
HFILES=\
|
||||||
../gc/go.h\
|
../gc/go.h\
|
||||||
@ -27,18 +27,9 @@ OFILES=\
|
|||||||
reg.$O\
|
reg.$O\
|
||||||
|
|
||||||
LIB=\
|
LIB=\
|
||||||
../gc/gc.a$O
|
../gc/gc.a\
|
||||||
|
|
||||||
$(TARG): $(OFILES) $(LIB)
|
include ../../Make.ccmd
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lbio -l9 -lm
|
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.$O $(TARG) *.8 enam.c 8.out a.out
|
|
||||||
|
|
||||||
install: $(TARG)
|
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
|
||||||
|
|
||||||
%.$O: ../gc/%.c
|
%.$O: ../gc/%.c
|
||||||
$(CC) $(CFLAGS) -c -I. -o $@ ../gc/$*.c
|
$(HOST_CC) $(HOST_CFLAGS) -c -I. -o $@ ../gc/$*.c
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
TARG=\
|
TARG=8l
|
||||||
8l\
|
|
||||||
|
|
||||||
OFILES=\
|
OFILES=\
|
||||||
asm.$O\
|
asm.$O\
|
||||||
@ -28,20 +28,13 @@ HFILES=\
|
|||||||
../ld/macho.h\
|
../ld/macho.h\
|
||||||
../ld/pe.h\
|
../ld/pe.h\
|
||||||
|
|
||||||
|
include ../../Make.ccmd
|
||||||
$(TARG): $(OFILES)
|
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lbio -l9
|
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
|
||||||
enam.c: 8.out.h
|
enam.c: 8.out.h
|
||||||
sh mkenam
|
sh mkenam
|
||||||
|
|
||||||
clean:
|
CLEANFILES+=enam.c
|
||||||
rm -f *.$O $(TARG) *.8 enam.c 8.out a.out
|
|
||||||
|
|
||||||
install: $(TARG)
|
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
|
||||||
|
|
||||||
%.$O: ../ld/%.c
|
%.$O: ../ld/%.c
|
||||||
$(CC) $(CFLAGS) -c -I. ../ld/$*.c
|
$(HOST_CC) $(HOST_CFLAGS) -c -I. ../ld/$*.c
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
LIB=\
|
LIB=cc.a
|
||||||
cc.a$O\
|
|
||||||
|
|
||||||
HFILES=\
|
HFILES=\
|
||||||
cc.h\
|
cc.h\
|
||||||
@ -30,18 +30,7 @@ OFILES=\
|
|||||||
dpchk.$O\
|
dpchk.$O\
|
||||||
omachcap.$O\
|
omachcap.$O\
|
||||||
|
|
||||||
$(LIB): $(OFILES)
|
NOINSTALL=1
|
||||||
ar rsc $(LIB) $(OFILES)
|
include ../../Make.clib
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
|
||||||
y.tab.h: $(YFILES)
|
|
||||||
bison -y $(YFLAGS) $(YFILES)
|
|
||||||
|
|
||||||
y.tab.c: y.tab.h
|
|
||||||
test -f y.tab.c && touch y.tab.c
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.$O *.6 enam.c 6.out a.out y.tab.h y.tab.c $(LIB)
|
|
||||||
|
|
||||||
install: $(LIB)
|
install: $(LIB)
|
||||||
|
@ -3,11 +3,9 @@
|
|||||||
# 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.
|
||||||
|
|
||||||
GOBIN="${GOBIN:-$HOME/bin}"
|
|
||||||
|
|
||||||
for i in cc 6l 6a 6c 8l 8a 8c 8g 5l 5a 5c 5g gc 6g gopack nm cgo cov ebnflint godefs godoc gofmt goinstall gotest goyacc hgpatch prof
|
for i in cc 6l 6a 6c 8l 8a 8c 8g 5l 5a 5c 5g gc 6g gopack nm cgo cov ebnflint godefs godoc gofmt goinstall gotest goyacc hgpatch prof
|
||||||
do
|
do
|
||||||
cd $i
|
cd $i
|
||||||
"$GOBIN"/gomake clean
|
gomake clean
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
# The directory is cov because the source is portable and general.
|
# The directory is cov because the source is portable and general.
|
||||||
# We call the binary 6cov to avoid confusion and because this binary
|
# We call the binary 6cov to avoid confusion and because this binary
|
||||||
@ -16,11 +17,11 @@ OFILES=\
|
|||||||
HFILES=\
|
HFILES=\
|
||||||
tree.h\
|
tree.h\
|
||||||
|
|
||||||
$(TARG): $(OFILES)
|
LIB=\
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lmach -lbio -l9
|
../../../lib/libmach.a\
|
||||||
|
|
||||||
clean:
|
NOINSTALL=1
|
||||||
rm -f *.$O $(TARG)
|
include ../../Make.ccmd
|
||||||
|
|
||||||
ifeq ($(GOOS),windows)
|
ifeq ($(GOOS),windows)
|
||||||
NAME=windows
|
NAME=windows
|
||||||
@ -39,5 +40,3 @@ install-darwin: $(TARG)
|
|||||||
|
|
||||||
install-default: $(TARG)
|
install-default: $(TARG)
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
cp $(TARG) "$(GOBIN)"/$(TARG)
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
@ -11,5 +11,5 @@ GOFILES=\
|
|||||||
include ../../Make.cmd
|
include ../../Make.cmd
|
||||||
|
|
||||||
test: $(TARG)
|
test: $(TARG)
|
||||||
$(QUOTED_GOBIN)/$(TARG) -start="SourceFile" "$(GOROOT)"/doc/go_spec.html
|
$(TARG) -start="SourceFile" "$(GOROOT)"/doc/go_spec.html
|
||||||
|
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
LIB=\
|
LIB=gc.a
|
||||||
gc.a$O\
|
|
||||||
|
|
||||||
HFILES=\
|
HFILES=\
|
||||||
go.h\
|
go.h\
|
||||||
@ -43,16 +43,10 @@ OFILES=\
|
|||||||
walk.$O\
|
walk.$O\
|
||||||
y1.tab.$O\
|
y1.tab.$O\
|
||||||
|
|
||||||
$(LIB): $(OFILES)
|
NOINSTALL=1
|
||||||
ar rsc $(LIB) $(OFILES)
|
include ../../Make.clib
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
install: $(LIB)
|
||||||
|
|
||||||
y.tab.h: $(YFILES)
|
|
||||||
LANG=C LANGUAGE="en_US.UTF8" bison -v -y $(YFLAGS) $(YFILES)
|
|
||||||
|
|
||||||
y.tab.c: y.tab.h
|
|
||||||
test -f y.tab.c && touch y.tab.c
|
|
||||||
|
|
||||||
y1.tab.c: y.tab.c # make yystate global, yytname mutable
|
y1.tab.c: y.tab.c # make yystate global, yytname mutable
|
||||||
cat y.tab.c | sed '/ int yystate;/d; s/int yychar;/int yychar, yystate;/; s/static const char \*const yytname/const char *yytname/' >y1.tab.c
|
cat y.tab.c | sed '/ int yystate;/d; s/int yychar;/int yychar, yystate;/; s/static const char \*const yytname/const char *yytname/' >y1.tab.c
|
||||||
@ -70,7 +64,4 @@ subr.$O: opnames.h
|
|||||||
opnames.h: mkopnames go.h
|
opnames.h: mkopnames go.h
|
||||||
./mkopnames go.h >opnames.h
|
./mkopnames go.h >opnames.h
|
||||||
|
|
||||||
clean:
|
CLEANFILES+=*.[568] [568].out y1.tab.c yerr.h mkbuiltin1 builtin.c _builtin.c opnames.h
|
||||||
rm -f *.[568o] enam.c [568].out a.out y.tab.h y.tab.c y1.tab.c y.output yerr.h $(LIB) mkbuiltin1 builtin.c _builtin.c opnames.h
|
|
||||||
|
|
||||||
install: $(LIB)
|
|
||||||
|
@ -10,11 +10,9 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
GOBIN="${GOBIN:-$HOME/bin}"
|
eval $(gomake -f ../../Make.inc go-env)
|
||||||
|
|
||||||
eval $("$GOBIN"/gomake -f ../../Make.inc go-env)
|
|
||||||
if [ -z "$GC" ]; then
|
if [ -z "$GC" ]; then
|
||||||
echo 'missing $GC - maybe no Make.$GOARCH?' 1>&2
|
echo 'missing $GC - gomake failed?' 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
TARG=godefs
|
TARG=godefs
|
||||||
OFILES=\
|
OFILES=\
|
||||||
@ -12,13 +13,4 @@ OFILES=\
|
|||||||
|
|
||||||
HFILES=a.h
|
HFILES=a.h
|
||||||
|
|
||||||
$(TARG): $(OFILES)
|
include ../../Make.ccmd
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lbio -l9
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.$O $(TARG)
|
|
||||||
|
|
||||||
install: $(TARG)
|
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
@ -3,9 +3,7 @@
|
|||||||
# 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.
|
||||||
|
|
||||||
GOBIN="${GOBIN:-$HOME/bin}"
|
eval $(gomake --no-print-directory -f ../../Make.inc go-env)
|
||||||
|
|
||||||
eval $("$GOBIN"/gomake --no-print-directory -f ../../Make.inc go-env)
|
|
||||||
if [ -z "$O" ]; then
|
if [ -z "$O" ]; then
|
||||||
echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
|
echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -51,10 +51,10 @@ func main() {
|
|||||||
fmt.Fprintf(os.Stderr, "%s: no $GOROOT\n", argv0)
|
fmt.Fprintf(os.Stderr, "%s: no $GOROOT\n", argv0)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
root += "/src/pkg/"
|
|
||||||
if gobin == "" {
|
if gobin == "" {
|
||||||
gobin = os.Getenv("HOME") + "/bin"
|
gobin = root + "/bin"
|
||||||
}
|
}
|
||||||
|
root += "/src/pkg/"
|
||||||
|
|
||||||
// special case - "unsafe" is already installed
|
// special case - "unsafe" is already installed
|
||||||
visit["unsafe"] = done
|
visit["unsafe"] = done
|
||||||
|
@ -2,17 +2,14 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
TARG=gopack
|
TARG=gopack
|
||||||
OFILES=\
|
OFILES=\
|
||||||
ar.$O\
|
ar.$O\
|
||||||
|
|
||||||
$(TARG): $(OFILES)
|
LIB=\
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lmach -lbio -l9
|
../../../lib/libmach.a\
|
||||||
|
|
||||||
clean:
|
include ../../Make.ccmd
|
||||||
rm -f *.$O $(TARG)
|
|
||||||
|
|
||||||
install: $(TARG)
|
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
|
||||||
|
@ -2,10 +2,9 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
|
||||||
TARG=gotest
|
TARG=gotest
|
||||||
GOROOT_FINAL?=$(GOROOT)
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@true
|
@true
|
||||||
|
@ -24,7 +24,7 @@ if [ ! -f [Mm]akefile ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
export GOROOT=${GOROOT:-"@@GOROOT@@"}
|
export GOROOT=${GOROOT:-"@@GOROOT@@"}
|
||||||
eval $("$GOBIN"/gomake --no-print-directory -f "$GOROOT"/src/Make.inc go-env)
|
eval $("$GOBIN"/gomake -j1 --no-print-directory -f "$GOROOT"/src/Make.inc go-env)
|
||||||
if [ -z "$O" ]; then
|
if [ -z "$O" ]; then
|
||||||
echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
|
echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
|
||||||
exit 2
|
exit 2
|
||||||
|
@ -7,9 +7,7 @@ set -e
|
|||||||
|
|
||||||
bash clean.bash
|
bash clean.bash
|
||||||
|
|
||||||
GOBIN="${GOBIN:-$HOME/bin}"
|
eval $(gomake --no-print-directory -f ../Make.inc go-env)
|
||||||
|
|
||||||
eval $("$GOBIN"/gomake --no-print-directory -f ../Make.inc go-env)
|
|
||||||
if [ -z "$O" ]; then
|
if [ -z "$O" ]; then
|
||||||
echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
|
echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
@ -17,7 +15,7 @@ fi
|
|||||||
|
|
||||||
cd ${O}l
|
cd ${O}l
|
||||||
bash mkenam
|
bash mkenam
|
||||||
"$GOBIN"/gomake enam.o
|
gomake enam.o
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Note: commands written in Go are not listed here.
|
# Note: commands written in Go are not listed here.
|
||||||
@ -27,6 +25,6 @@ for i in cc ${O}l ${O}a ${O}c gc ${O}g cov godefs gopack gotest nm prof
|
|||||||
do
|
do
|
||||||
echo; echo; echo %%%% making $i %%%%; echo
|
echo; echo; echo %%%% making $i %%%%; echo
|
||||||
cd $i
|
cd $i
|
||||||
"$GOBIN"/gomake install
|
gomake install
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
|
@ -2,23 +2,17 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
# The directory is nm because the source is portable and general.
|
# The directory is nm because the source is portable and general.
|
||||||
# We call the binary 6nm to avoid confusion and because this binary
|
# We call the binary 6nm to avoid confusion with the host nm.
|
||||||
# is linked only with amd64 and x86 support.
|
|
||||||
|
|
||||||
TARG=6nm
|
TARG=6nm
|
||||||
OFILES=\
|
OFILES=\
|
||||||
nm.$O\
|
nm.$O\
|
||||||
|
|
||||||
$(TARG): $(OFILES)
|
LIB=\
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lmach -lbio -l9
|
../../../lib/libmach.a\
|
||||||
|
|
||||||
clean:
|
include ../../Make.ccmd
|
||||||
rm -f *.$O $(TARG)
|
|
||||||
|
|
||||||
install: $(TARG)
|
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
# 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.conf
|
include ../../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
# The directory is prof because the source is portable and general.
|
# The directory is prof because the source is portable and general.
|
||||||
# We call the binary 6prof to avoid confusion and because this binary
|
# We call the binary 6prof to avoid confusion and because this binary
|
||||||
@ -12,15 +13,11 @@ TARG=6prof
|
|||||||
OFILES=\
|
OFILES=\
|
||||||
main.$O\
|
main.$O\
|
||||||
|
|
||||||
#HFILES=\
|
LIB=\
|
||||||
# defs.h\
|
../../../lib/libmach.a\
|
||||||
# fns.h\
|
|
||||||
|
|
||||||
$(TARG): $(OFILES)
|
NOINSTALL=1
|
||||||
$(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lmach -lbio -l9
|
include ../../Make.ccmd
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.$O $(TARG)
|
|
||||||
|
|
||||||
ifeq ($(GOOS),windows)
|
ifeq ($(GOOS),windows)
|
||||||
NAME=windows
|
NAME=windows
|
||||||
@ -40,7 +37,5 @@ install-darwin: $(TARG)
|
|||||||
install-default: $(TARG)
|
install-default: $(TARG)
|
||||||
cp $(TARG) "$(GOBIN)"/$(TARG)
|
cp $(TARG) "$(GOBIN)"/$(TARG)
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
|
||||||
install-pprof: gopprof
|
install-pprof: gopprof
|
||||||
cp gopprof "$(GOBIN)"/gopprof
|
cp gopprof "$(GOBIN)"/gopprof
|
||||||
|
27
src/env.bash
27
src/env.bash
@ -3,21 +3,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.
|
||||||
|
|
||||||
if test -z "$GOBIN"; then
|
|
||||||
if ! test -d "$HOME"/bin; then
|
|
||||||
echo '$GOBIN is not set and $HOME/bin is not a directory or does not exist.' 1>&2
|
|
||||||
echo 'mkdir $HOME/bin or set $GOBIN to a directory where binaries should' 1>&2
|
|
||||||
echo 'be installed.' 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
GOBIN="$HOME/bin"
|
|
||||||
elif ! test -d "$GOBIN"; then
|
|
||||||
echo '$GOBIN is not a directory or does not exist' 1>&2
|
|
||||||
echo 'create it or set $GOBIN differently' 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
export GOBIN
|
|
||||||
|
|
||||||
export GOROOT=${GOROOT:-$(cd ..; pwd)}
|
export GOROOT=${GOROOT:-$(cd ..; pwd)}
|
||||||
|
|
||||||
if ! test -f "$GOROOT"/include/u.h
|
if ! test -f "$GOROOT"/include/u.h
|
||||||
@ -36,6 +21,16 @@ if [ "$DIR1" != "$DIR2" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export GOBIN=${GOBIN:-"$GOROOT/bin"}
|
||||||
|
if [ ! -d "$GOBIN" ]; then
|
||||||
|
echo '$GOBIN is not a directory or does not exist' 1>&2
|
||||||
|
echo 'create it or set $GOBIN differently' 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
export OLDPATH=$PATH
|
||||||
|
export PATH=/bin:/usr/bin:$GOBIN:$PATH
|
||||||
|
|
||||||
MAKE=make
|
MAKE=make
|
||||||
if ! make --version 2>/dev/null | grep 'GNU Make' >/dev/null; then
|
if ! make --version 2>/dev/null | grep 'GNU Make' >/dev/null; then
|
||||||
MAKE=gmake
|
MAKE=gmake
|
||||||
@ -43,7 +38,7 @@ fi
|
|||||||
|
|
||||||
# Tried to use . <($MAKE ...) here, but it cannot set environment
|
# Tried to use . <($MAKE ...) here, but it cannot set environment
|
||||||
# variables in the version of bash that ships with OS X. Amazing.
|
# variables in the version of bash that ships with OS X. Amazing.
|
||||||
eval $($MAKE --no-print-directory -f Make.inc.in go-env | egrep 'GOARCH|GOOS|GO_ENV')
|
eval $($MAKE --no-print-directory -f Make.inc go-env | egrep 'GOARCH|GOOS|GO_ENV')
|
||||||
|
|
||||||
# Shell doesn't tell us whether make succeeded,
|
# Shell doesn't tell us whether make succeeded,
|
||||||
# so Make.inc generates a fake variable name.
|
# so Make.inc generates a fake variable name.
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
# 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.conf
|
include ../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
LIB=lib9.a
|
LIB=lib9.a
|
||||||
|
|
||||||
@ -101,40 +102,19 @@ OFILES=\
|
|||||||
$(UTFOFILES)\
|
$(UTFOFILES)\
|
||||||
|
|
||||||
HFILES=\
|
HFILES=\
|
||||||
"$(GOROOT)"/include/u.h\
|
$(QUOTED_GOROOT)/include/u.h\
|
||||||
"$(GOROOT)"/include/libc.h\
|
$(QUOTED_GOROOT)/include/libc.h\
|
||||||
|
|
||||||
|
include ../Make.clib
|
||||||
|
|
||||||
GOROOT_FINAL?=$(GOROOT)
|
GOROOT_FINAL?=$(GOROOT)
|
||||||
|
|
||||||
install: $(LIB)
|
|
||||||
cp $(LIB) "$(GOROOT)/lib"
|
|
||||||
|
|
||||||
$(LIB): $(OFILES)
|
|
||||||
ar rsc $(LIB) $(OFILES)
|
|
||||||
|
|
||||||
%.$O: fmt/%.c
|
%.$O: fmt/%.c
|
||||||
$(CC) -c $(CFLAGS) -DPLAN9PORT -Ifmt $<
|
$(HOST_CC) -c $(HOST_CFLAGS) -DPLAN9PORT -Ifmt $<
|
||||||
|
|
||||||
%.$O: utf/%.c
|
%.$O: utf/%.c
|
||||||
$(CC) -c $(CFLAGS) $<
|
$(HOST_CC) -c $(HOST_CFLAGS) $<
|
||||||
|
|
||||||
goos.$O: goos.c
|
goos.$O: goos.c
|
||||||
$(CC) -c $(CFLAGS) -DGOOS='"$(GOOS)"' -DGOARCH='"$(GOARCH)"' -DGOROOT='"$(GOROOT_FINAL)"' -DGOVERSION='"'"$$(../version.bash)"'"' $<
|
$(HOST_CC) -c $(HOST_CFLAGS) -DGOOS='"$(GOOS)"' -DGOARCH='"$(GOARCH)"' -DGOROOT='"$(GOROOT_FINAL)"' -DGOVERSION='"'"$$(../version.bash)"'"' $<
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.$O *.6 6.out $(LIB)
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f "$(GOROOT)"/lib/$(LIB)
|
|
||||||
|
|
||||||
#XLIB=$PLAN9/lib/$LIB
|
|
||||||
|
|
||||||
#testfmt: testfmt.$O $XLIB
|
|
||||||
# $LD -o $target testfmt.$O
|
|
||||||
|
|
||||||
#testfltfmt: testfltfmt.$O $XLIB
|
|
||||||
# $LD -o $target testfltfmt.$O
|
|
||||||
|
|
||||||
#testprint: testprint.$O $XLIB
|
|
||||||
# $LD -o $target testprint.$O
|
|
||||||
|
|
||||||
|
@ -22,7 +22,8 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
include ../Make.conf
|
include ../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
LIB=libbio.a
|
LIB=libbio.a
|
||||||
|
|
||||||
@ -47,19 +48,4 @@ OFILES=\
|
|||||||
HFILES=\
|
HFILES=\
|
||||||
../../include/bio.h
|
../../include/bio.h
|
||||||
|
|
||||||
install: $(LIB)
|
include ../Make.clib
|
||||||
cp $(LIB) ../../lib
|
|
||||||
|
|
||||||
$(LIB): $(OFILES)
|
|
||||||
ar rsc $(LIB) $(OFILES)
|
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
|
||||||
y.tab.c: $(YFILES)
|
|
||||||
yacc $(YFLAGS) $(YFILES)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(OFILES) *.6 6.out $(LIB)
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f ../../lib/$(LIB)
|
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
include ../Make.conf
|
include ../Make.inc
|
||||||
|
O:=$(HOST_O)
|
||||||
|
|
||||||
LIB=libmach.a
|
LIB=libmach.a
|
||||||
OFILES=\
|
OFILES=\
|
||||||
@ -60,17 +61,4 @@ endif
|
|||||||
|
|
||||||
HFILES=../../include/mach.h elf.h macho.h obj.h
|
HFILES=../../include/mach.h elf.h macho.h obj.h
|
||||||
|
|
||||||
install: $(LIB)
|
include ../Make.clib
|
||||||
cp $(LIB) ../../lib
|
|
||||||
|
|
||||||
$(LIB): $(OFILES)
|
|
||||||
ar rsc $(LIB) $(OFILES)
|
|
||||||
|
|
||||||
$(OFILES): $(HFILES)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.$O $(LIB)
|
|
||||||
|
|
||||||
nuke: clean
|
|
||||||
rm -f "$(GOROOT)"/lib/$(LIB)
|
|
||||||
|
|
||||||
|
@ -11,8 +11,6 @@ fi
|
|||||||
. ./env.bash
|
. ./env.bash
|
||||||
|
|
||||||
GOROOT_FINAL=${GOROOT_FINAL:-$GOROOT}
|
GOROOT_FINAL=${GOROOT_FINAL:-$GOROOT}
|
||||||
rm -f Make.inc
|
|
||||||
sed 's!@@GOROOT@@!'"$GOROOT_FINAL"'!' Make.inc.in >Make.inc
|
|
||||||
|
|
||||||
MAKEFLAGS=${MAKEFLAGS:-"-j4"}
|
MAKEFLAGS=${MAKEFLAGS:-"-j4"}
|
||||||
export MAKEFLAGS
|
export MAKEFLAGS
|
||||||
@ -90,6 +88,12 @@ installed() {
|
|||||||
echo ---
|
echo ---
|
||||||
echo Installed Go for $GOOS/$GOARCH in "$GOROOT".
|
echo Installed Go for $GOOS/$GOARCH in "$GOROOT".
|
||||||
echo Installed commands in "$GOBIN".
|
echo Installed commands in "$GOBIN".
|
||||||
|
case "$OLDPATH" in
|
||||||
|
*":$GOBIN" | *":$GOBIN:"*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo '***' You need to add $GOBIN to your "'$PATH.' '***'
|
||||||
|
esac
|
||||||
echo The compiler is $GC.
|
echo The compiler is $GC.
|
||||||
if [ "$(uname)" = "Darwin" ]; then
|
if [ "$(uname)" = "Darwin" ]; then
|
||||||
echo
|
echo
|
||||||
|
@ -4,7 +4,12 @@
|
|||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
. ./env.bash
|
if [ "$1" = "--no-env" ]; then
|
||||||
|
# caller has already run env.bash
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
. ./env.bash
|
||||||
|
fi
|
||||||
|
|
||||||
unset MAKEFLAGS # single-threaded make
|
unset MAKEFLAGS # single-threaded make
|
||||||
unset CDPATH # in case user has it set
|
unset CDPATH # in case user has it set
|
||||||
|
Loading…
Reference in New Issue
Block a user