🐵 Monkey programming language interpreter designed in Writing An Interpreter In Go and Writing a Compiler in Go. A step-by-step walk-through where each commit is a fully working part. Read the books…
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

40 lines
705 B

.PHONY: dev build install image release profile bench test clean
CGO_ENABLED=0
COMMIT=$(shell git rev-parse --short HEAD)
all: dev
dev: build
@./monkey-lang -d
build: clean
@go build \
-tags "netgo static_build" -installsuffix netgo \
-ldflags "-w -X $(shell go list)/version/.GitCommit=$(COMMIT)" \
.
install: build
@go install
image:
@docker build -t prologic/monkey-lang .
release:
@./tools/release.sh
profile:
@go test -cpuprofile cpu.prof -memprofile mem.prof -v -bench ./...
bench:
@go test -v -benchmem -bench=. ./...
test: build
@go test -v \
-cover -coverprofile=coverage.txt -covermode=atomic \
-coverpkg=$(shell go list) \
-race \
.
clean:
@git clean -f -d -X