diff options
author | Evan Shaw <chickencha@gmail.com> | 2010-04-11 12:42:19 -0700 |
---|---|---|
committer | Evan Shaw <chickencha@gmail.com> | 2010-04-11 12:42:19 -0700 |
commit | 76f7893fb9a8a55ab1ebb7083b4d644a8cc30b1b (patch) | |
tree | c662f24e2b635548f725bf91be71e5e629cff4f2 /src | |
parent | 6eadb9f0567d33f1a92658600903308a1bb64f39 (diff) | |
download | golang-76f7893fb9a8a55ab1ebb7083b4d644a8cc30b1b.tar.gz |
exp/eval: Fix example and add target to Makefile
R=rsc
CC=golang-dev
http://codereview.appspot.com/901042
Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pkg/exp/eval/Makefile | 6 | ||||
-rw-r--r-- | src/pkg/exp/eval/main.go | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/pkg/exp/eval/Makefile b/src/pkg/exp/eval/Makefile index 46445876b..eac844f1e 100644 --- a/src/pkg/exp/eval/Makefile +++ b/src/pkg/exp/eval/Makefile @@ -21,3 +21,9 @@ GOFILES=\ world.go\ include ../../../Make.pkg + +main.$O: main.go $(pkgdir)/$(TARG).a + $(QUOTED_GOBIN)/$(GC) $< + +eval: main.$O + $(QUOTED_GOBIN)/$(LD) -o $@ $< diff --git a/src/pkg/exp/eval/main.go b/src/pkg/exp/eval/main.go index e7c58ef5b..6033088a3 100644 --- a/src/pkg/exp/eval/main.go +++ b/src/pkg/exp/eval/main.go @@ -5,12 +5,12 @@ package main import ( - "./_obj/eval" "bufio" + "exp/eval" "flag" "go/parser" "go/scanner" - "io" + "io/ioutil" "os" ) @@ -25,7 +25,7 @@ func main() { println(err.String()) os.Exit(1) } - file, err := parser.ParseFile(*filename, data, 0) + file, err := parser.ParseFile(*filename, data, nil, 0) if err != nil { println(err.String()) os.Exit(1) @@ -41,7 +41,7 @@ func main() { } os.Exit(1) } - _, err := code.Run() + _, err = code.Run() if err != nil { println(err.String()) os.Exit(1) |