aboutsummaryrefslogtreecommitdiff
path: root/contrib/go/Makefile
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2016-08-23 20:50:05 -0300
committerDavid Bremner <david@tethera.net>2016-09-03 20:13:08 -0300
commitb0d03fc5ba1211ed783a5c052d01407d95c8446f (patch)
tree2ca9c78a2380bdcf9dda25a0affb834c8f70a9e6 /contrib/go/Makefile
parent2f2df00d436b117acd3e0de13548406efaf272b8 (diff)
bindings: move go bindings to contrib
This signals two things, an intent to be more liberal about accepting patches, and an intent to stop distributing the bindings if maintenance doesn't pick up.
Diffstat (limited to 'contrib/go/Makefile')
-rw-r--r--contrib/go/Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/contrib/go/Makefile b/contrib/go/Makefile
new file mode 100644
index 00000000..1b9e7505
--- /dev/null
+++ b/contrib/go/Makefile
@@ -0,0 +1,40 @@
+# Makefile for the go bindings of notmuch
+
+export GOPATH ?= $(shell pwd)
+export CGO_CFLAGS ?= -I../../../../lib
+export CGO_LDFLAGS ?= -L../../../../lib
+
+GO ?= go
+GOFMT ?= gofmt
+
+all: notmuch notmuch-addrlookup
+
+.PHONY: notmuch
+notmuch:
+ $(GO) install notmuch
+
+.PHONY: goconfig
+goconfig:
+ if [ ! -d github.com/msbranco/goconfig ]; then \
+ $(GO) get github.com/msbranco/goconfig; \
+ fi
+
+.PHONY: notmuch-addrlookup
+notmuch-addrlookup: notmuch goconfig
+ $(GO) install notmuch-addrlookup
+
+.PHONY: format
+format:
+ $(GOFMT) -w=true $(GOFMT_OPTS) src/notmuch
+ $(GOFMT) -w=true $(GOFMT_OPTS) src/notmuch-addrlookup
+
+.PHONY: check-format
+check-format:
+ $(GOFMT) -d=true $(GOFMT_OPTS) src/notmuch
+ $(GOFMT) -d=true $(GOFMT_OPTS) src/notmuch-addrlookup
+
+.PHONY: clean
+clean:
+ $(GO) clean notmuch
+ $(GO) clean notmuch-addrlookup
+ rm -rf pkg bin