]> Cypherpunks.ru repositories - gocheese.git/blobdiff - Makefile
URL fixes
[gocheese.git] / Makefile
index 3e93e1a6af95ddb4ae926f8d6051c5f5b125cf19..d88c7e65a5d501d720e45c486dea89c608004d9b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,19 @@
+GO ?= go
+MAKEINFO ?= makeinfo
+
+GOPATH != pwd
 VERSION != cat VERSION
+
+MOD = go.cypherpunks.ru/gocheese/v2
 LDFLAGS = -X main.Version=$(VERSION)
 
-gocheese: gocheese.go
-       GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)"
+all: gocheese gocheese.info
+
+gocheese:
+       GOPATH=$(GOPATH) go build -o gocheese -ldflags "$(LDFLAGS)" $(MOD)
+
+gocheese.info: *.texi
+       $(MAKEINFO) -o $@ gocheese.texi
+
+test:
+       GOPATH=$(GOPATH) go test $(MOD)/...