-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
49 lines (35 loc) · 890 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
include ${GOROOT}/src/Make.inc
TARG = kakapo
GOFILES = kakapo.go repl.go packages.go
PREREQ = lisp
CLEANFILES = _go_.${O} ${TARG} lisp.a repl.go packages.go
TXT2GO = ./txt2go.sh
${TARG}: ${GOFILES} ${PREREQ}
go build -o kakapo -x
repl.go: repl.lisp
${TXT2GO} repl < repl.lisp > $@
packages.go: scanpkgs/scanpkgs
scanpkgs/scanpkgs > packages.go
gofmt -w packages.go
lisp:
cd lisp && go install -x
scanpkgs/scanpkgs: scanpkgs/scanpkgs.${O}
${LD} -o $@ scanpkgs/scanpkgs.${O}
scanpkgs/scanpkgs.${O}: scanpkgs/main.go
${GC} -o $@ scanpkgs/main.go
clean:
rm -f ${CLEANFILES}
rm -f scanpkgs/scanpkgs.${O} scanpkgs/scanpkgs
cd lisp && go clean
ifeq ($(TARGDIR),)
TARGDIR:=$(QUOTED_GOBIN)
endif
install:
mkdir -p $(TARGDIR) && cp -f $(TARG) $(TARGDIR)
fmt:
gofmt -w kakapo.go
make -Clisp fmt
test: ${TARG}
make -Clisp test
./test.sh
.PHONY: lisp test fmt clean install