doc/code.html | 26 ++++++++++++++++++++++++++ diff --git a/doc/code.html b/doc/code.html index 8e72d5ace25249ff6bad6105f8def2be0b299905..a5783ce740835f1416b035a5f4a27d76adfc9f7f 100644 --- a/doc/code.html +++ b/doc/code.html @@ -177,6 +177,32 @@ Effective Go is an introduction to that topic.
+To build a Go program with gomake, create a Makefile alongside your program's
+source files. It should be similar to the example above, but include
+Make.cmd instead of Make.pkg:
+
+
+include $(GOROOT)/src/Make.inc + +TARG=helloworld +GOFILES=\ + helloworld.go\ + +include $(GOROOT)/src/Make.cmd ++ +
Running gomake build will compile helloworld.go
+and produce an executable named helloworld in the current
+directory.
+
+Running gomake install will build helloworld if
+necessary and copy it to the $GOBIN directory
+($GOROOT/bin/ is the default).
+