Permalink
Browse files

Fixing build on go tip

  • Loading branch information...
1 parent 148c8ad commit 976021084453bfd7fc7041be53d987ccf29b9cd1 @bytbox committed Feb 1, 2012
Showing with 9 additions and 27 deletions.
  1. +2 −3 Makefile
  2. +0 −17 lisp/Makefile
  3. +7 −7 scanpkgs/main.go
View
@@ -17,8 +17,7 @@ packages.go: scanpkgs/scanpkgs
gofmt -w packages.go
lisp:
- make -Clisp
- cp lisp/_obj/lisp.a .
+ cd lisp && go install -x
scanpkgs/scanpkgs: scanpkgs/scanpkgs.${O}
${LD} -o $@ scanpkgs/scanpkgs.${O}
@@ -29,7 +28,7 @@ scanpkgs/scanpkgs.${O}: scanpkgs/main.go
clean:
rm -f ${CLEANFILES}
rm -f scanpkgs/scanpkgs.${O} scanpkgs/scanpkgs
- make -Clisp clean
+ cd lisp && go clean
ifeq ($(TARGDIR),)
TARGDIR:=$(QUOTED_GOBIN)
View
@@ -1,17 +0,0 @@
-include ${GOROOT}/src/Make.inc
-
-TARG = lisp
-BUILTINGO = cons.go math.go panic.go bool.go
-SRCFILES = parse.go eval.go util.go builtins.go syntax.go compat.go types.go primitives.go scope.go interpret.go ${BUILTINGO}
-GOFILES = ${SRCFILES} init.go
-#CLEANFILES = init.go
-TXT2GO = ./txt2go.sh
-
-include ${GOROOT}/src/Make.pkg
-
-init.go: init.lisp ${TXT2GO}
- ${TXT2GO} lisp init_lisp < init.lisp > $@
-
-fmt:
- gofmt -w ${SRCFILES}
-
View
@@ -45,8 +45,8 @@ func main() {
import . "reflect"`)
- // find AR(1)
- findAr()
+ // find GO(1)
+ findGo()
goroot := runtime.GOROOT()
pkgDir := path.Join(goroot, "pkg", runtime.GOOS + "_" + runtime.GOARCH)
@@ -141,12 +141,12 @@ func ignored(name string) bool {
return false
}
-var arpath string
+var gopath string
func readPackage(p, d, n string, pkgs map[string][]item) {
i := path.Join(p, n[0:len(n)-2])
// TODO do this /without/ shelling out to AR(1)
fname := path.Join(d, p, n)
- cmd := exec.Command(arpath, "x", fname, "__.PKGDEF")
+ cmd := exec.Command(gopath, "tool", "pack", "x", fname, "__.PKGDEF")
err := cmd.Run()
if err != nil {
panic(err)
@@ -183,12 +183,12 @@ func readPackage(p, d, n string, pkgs map[string][]item) {
os.Remove("__.PKGDEF")
}
-func findAr() {
- ar, err := exec.LookPath("gopack")
+func findGo() {
+ var err error
+ gopath, err = exec.LookPath("go")
if err != nil {
panic(err)
}
- arpath = ar
}
func getFirst(s string) rune {

0 comments on commit 9760210

Please sign in to comment.