1.PHONY: chromad upload all
 2
 3VERSION ?= $(shell git describe --tags --dirty  --always)
 4
 5all: README.md tokentype_string.go
 6
 7README.md: lexers/*/*.go
 8	./table.py
 9
10tokentype_string.go: types.go
11	go generate
12
13chromad:
14	rm -f chromad
15	(export CGOENABLED=0 GOOS=linux GOARCH=amd64; cd ./cmd/chromad && go build -ldflags="-X 'main.version=$(VERSION)'" -o ../../chromad .)
16
17upload: chromad
18	scp chromad root@swapoff.org: && \
19		ssh root@swapoff.org 'install -m755 ./chromad /srv/http/swapoff.org/bin && service chromad restart'