From 65112628dc8faba0e9f794d6f21d1e2091d5c871 Mon Sep 17 00:00:00 2001 From: Fumitoshi Ukai Date: Sun, 29 Nov 2009 21:22:05 -0800 Subject: [PATCH] Fix example Makefile to avoid $GOROOT in case it has spaces. R=rsc, sergio https://golang.org/cl/162058 --- doc/contribute.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/contribute.html b/doc/contribute.html index 1c9301d18b2..26451f56cf7 100644 --- a/doc/contribute.html +++ b/doc/contribute.html @@ -64,7 +64,7 @@ The basic form is illustrated by

-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
 

The first and last lines include standard definitions and rules, +$(GOROOT)/src/Make.$(GOARCH) and $(GOROOT)/src/Make.pkg, so that the body of the Makefile need only specify two variables. +For packages to be installed in the Go tree, use a relative path instead of +$(GOROOT)/src, so that make will work correctly even if $(GOROOT) contains spaces.