]> Cypherpunks repositories - gostls13.git/commitdiff
Fix example Makefile to avoid $GOROOT in case it has spaces.
authorFumitoshi Ukai <ukai@google.com>
Mon, 30 Nov 2009 05:22:05 +0000 (21:22 -0800)
committerRuss Cox <rsc@golang.org>
Mon, 30 Nov 2009 05:22:05 +0000 (21:22 -0800)
R=rsc, sergio
https://golang.org/cl/162058

doc/contribute.html

index 1c9301d18b2f822d9347c94c919840d76e7a2b64..26451f56cf7860da68171834202f223ab60c5b5c 100644 (file)
@@ -64,7 +64,7 @@ The basic form is illustrated by <a href="../src/pkg/container/vector/Makefile">
 </p>
 
 <pre>
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=container/vector
 GOFILES=\
@@ -72,12 +72,15 @@ GOFILES=\
        stringvector.go\
        vector.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
 </pre>
 
 <p>
 The first and last lines <code>include</code> standard definitions and rules,
+<code>$(GOROOT)/src/Make.$(GOARCH)</code> and <code>$(GOROOT)/src/Make.pkg</code>,
 so that the body of the <code>Makefile</code> need only specify two variables.
+For packages to be installed in the Go tree, use a relative path instead of
+<code>$(GOROOT)/src</code>, so that make will work correctly even if <code>$(GOROOT)</code> contains spaces.
 </p>
 
 <p>