mirror of
https://github.com/golang/go
synced 2024-11-21 21:54:40 -07:00
Fix example Makefile to avoid $GOROOT in case it has spaces.
R=rsc, sergio https://golang.org/cl/162058
This commit is contained in:
parent
be98bc488e
commit
65112628dc
@ -64,7 +64,7 @@ The basic form is illustrated by <a href="../src/pkg/container/vector/Makefile">
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
include $(GOROOT)/src/Make.$(GOARCH)
|
include ../../../Make.$(GOARCH)
|
||||||
|
|
||||||
TARG=container/vector
|
TARG=container/vector
|
||||||
GOFILES=\
|
GOFILES=\
|
||||||
@ -72,12 +72,15 @@ GOFILES=\
|
|||||||
stringvector.go\
|
stringvector.go\
|
||||||
vector.go\
|
vector.go\
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.pkg
|
include ../../../Make.pkg
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The first and last lines <code>include</code> standard definitions and rules,
|
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.
|
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>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
Loading…
Reference in New Issue
Block a user