summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevon H. O'Dell <devon.odell@gmail.com>2010-01-05 16:22:40 -0800
committerDevon H. O'Dell <devon.odell@gmail.com>2010-01-05 16:22:40 -0800
commit8bd71d7f1cf417bab5634e8449dc74d98e2c1eb5 (patch)
treefb31e579cef4e423f01e4b51b6deb341eb42561d
parentf74750aed1b86c7698a09bf46697fc683745866d (diff)
downloadgolang-8bd71d7f1cf417bab5634e8449dc74d98e2c1eb5.tar.gz
Fix missing explicit GOBIN in src/pkg/Makefile. Clean up creation of QUOTED_GOBIN
Fixes issue 468 R=rsc CC=golang-dev http://codereview.appspot.com/181077 Committer: Russ Cox <rsc@golang.org>
-rw-r--r--src/Make.conf8
-rw-r--r--src/Make.pkg10
-rw-r--r--src/pkg/Makefile16
3 files changed, 16 insertions, 18 deletions
diff --git a/src/Make.conf b/src/Make.conf
index a90ed0da4..fa7177aa8 100644
--- a/src/Make.conf
+++ b/src/Make.conf
@@ -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
diff --git a/src/Make.pkg b/src/Make.pkg
index b315b2ee1..d4196b6e8 100644
--- a/src/Make.pkg
+++ b/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)
diff --git a/src/pkg/Makefile b/src/pkg/Makefile
index f37502d58..7d1e80d8d 100644
--- a/src/pkg/Makefile
+++ b/src/pkg/Makefile
@@ -9,6 +9,14 @@
#
# to rebuild the dependency information in Make.deps.
+nullstring :=
+space := $(nullstring)
+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