1.PHONY: chromad upload all
2
3all: README.md tokentype_string.go
4
5README.md: lexers/*/*.go
6	./table.py
7
8tokentype_string.go: types.go
9	go generate
10
11chromad:
12	(cd ./cmd/chromad && go get github.com/GeertJohan/go.rice/rice@master && go install github.com/GeertJohan/go.rice/rice)
13	rm -f chromad
14	(export CGOENABLED=0 GOOS=linux ; cd ./cmd/chromad && go build -o ../../chromad .)
15	rice append -i ./cmd/chromad --exec=./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'
20