]> Cypherpunks repositories - gostls13.git/commitdiff
Fix missing explicit GOBIN in src/pkg/Makefile. Clean up creation of QUOTED_GOBIN
authorDevon H. O'Dell <devon.odell@gmail.com>
Wed, 6 Jan 2010 00:22:40 +0000 (16:22 -0800)
committerRuss Cox <rsc@golang.org>
Wed, 6 Jan 2010 00:22:40 +0000 (16:22 -0800)
Fixes #468

R=rsc
CC=golang-dev
https://golang.org/cl/181077

src/Make.conf
src/Make.pkg
src/pkg/Makefile

index a90ed0da4d6d70fadc3842348b17fdd8b0e9ca43..fa7177aa83cc4c1b36c1cc1ca49179f6c41bb014 100644 (file)
@@ -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
index b315b2ee1e56bc720d166b4c1d3ec317fa377d3a..d4196b6e845780e7f8242170c1ebc40c3f3fb626 100644 (file)
@@ -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)
index f37502d58d4e531226bc5a18e6dd1a2d0923a6a1..7d1e80d8db00c98e6ab1400ba1f14e9325773a1e 100644 (file)
@@ -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