mirror of
https://github.com/golang/go
synced 2024-11-21 21:54:40 -07:00
Fix missing explicit GOBIN in src/pkg/Makefile. Clean up creation of
QUOTED_GOBIN. Re-take of 181077; fixes copy-pasta that broke build. Fixes #468 R=rsc CC=golang-dev https://golang.org/cl/183125
This commit is contained in:
parent
597e57f4d5
commit
2eb9171dfb
@ -6,17 +6,13 @@ CFLAGS=-ggdb -I"$(GOROOT)"/include -O2 -fno-inline
|
||||
O=o
|
||||
YFLAGS=-d
|
||||
# GNU Make syntax:
|
||||
ifndef GOBIN
|
||||
nullstring :=
|
||||
space := $(nullstring) # a space at the end
|
||||
ifndef GOBIN
|
||||
QUOTED_HOME=$(subst $(space),\ ,$(HOME))
|
||||
GOBIN=$(QUOTED_HOME)/bin
|
||||
QUOTED_GOBIN=$(subst $(space),\ ,$(GOBIN))
|
||||
else
|
||||
nullstring :=
|
||||
space := $(nullstring) # a space at the end
|
||||
QUOTED_GOBIN=$(subst $(space),\ ,$(GOBIN))
|
||||
endif
|
||||
QUOTED_GOBIN=$(subst $(space),\ ,$(GOBIN))
|
||||
|
||||
CC=$(QUOTED_GOBIN)/quietgcc
|
||||
LD=$(QUOTED_GOBIN)/quietgcc
|
||||
|
10
src/Make.pkg
10
src/Make.pkg
@ -6,17 +6,13 @@ all: package
|
||||
package: _obj/$(TARG).a
|
||||
testpackage: _test/$(TARG).a
|
||||
|
||||
ifndef GOBIN
|
||||
nullstring :=
|
||||
space := $(nullstring) # a space at the end
|
||||
ifndef GOBIN
|
||||
QUOTED_HOME=$(subst $(space),\ ,$(HOME))
|
||||
GOBIN=$(QUOTED_HOME)/bin
|
||||
QUOTED_GOBIN=$(subst $(space),\ ,$(GOBIN))
|
||||
else
|
||||
nullstring :=
|
||||
space := $(nullstring) # a space at the end
|
||||
QUOTED_GOBIN=$(subst $(space),\ ,$(GOBIN))
|
||||
endif
|
||||
QUOTED_GOBIN=$(subst $(space),\ ,$(GOBIN))
|
||||
|
||||
# GNU Make 3.80 has a bug in lastword
|
||||
# elem=$(lastword $(subst /, ,$(TARG)))
|
||||
@ -30,8 +26,6 @@ dir=$(patsubst %/$(elem),%,$(TARG))
|
||||
endif
|
||||
|
||||
# ugly hack to deal with whitespaces in $GOROOT
|
||||
nullstring :=
|
||||
space := $(nullstring) # a space at the end
|
||||
QUOTED_GOROOT=$(subst $(space),\ ,$(GOROOT))
|
||||
|
||||
pkgdir=$(QUOTED_GOROOT)/pkg/$(GOOS)_$(GOARCH)
|
||||
|
@ -9,6 +9,14 @@
|
||||
#
|
||||
# to rebuild the dependency information in Make.deps.
|
||||
|
||||
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))
|
||||
|
||||
all: install
|
||||
|
||||
DIRS=\
|
||||
@ -135,16 +143,16 @@ nuke.dirs: $(addsuffix .nuke, $(DIRS))
|
||||
test.dirs: $(addsuffix .test, $(TEST))
|
||||
|
||||
%.clean:
|
||||
+cd $* && gomake clean
|
||||
+cd $* && $(QUOTED_GOBIN)/gomake clean
|
||||
|
||||
%.install:
|
||||
+cd $* && gomake install
|
||||
+cd $* && $(QUOTED_GOBIN)/gomake install
|
||||
|
||||
%.nuke:
|
||||
+cd $* && gomake nuke
|
||||
+cd $* && $(QUOTED_GOBIN)/gomake nuke
|
||||
|
||||
%.test:
|
||||
+cd $* && gomake test
|
||||
+cd $* && $(QUOTED_GOBIN)/gomake test
|
||||
|
||||
clean: clean.dirs
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user