Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 7B454431FC0 for ; Wed, 9 May 2012 04:15:46 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lwM38v-eud8U for ; Wed, 9 May 2012 04:15:44 -0700 (PDT) Received: from mail.cryptobitch.de (cryptobitch.de [88.198.7.68]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 1CF7E431FCF for ; Wed, 9 May 2012 04:15:42 -0700 (PDT) Received: from mail.jade-hamburg.de (mail.jade-hamburg.de [85.183.11.228]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cryptobitch.de (Postfix) with ESMTPSA id 9FF01588C23 for ; Wed, 9 May 2012 13:15:40 +0200 (CEST) Received: by mail.jade-hamburg.de (Postfix, from userid 401) id 45C8CDF2A8; Wed, 9 May 2012 13:15:25 +0200 (CEST) Received: from thinkbox.jade-hamburg.de (mail.jade-hamburg.de [85.183.11.228]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: teythoon) by mail.jade-hamburg.de (Postfix) with ESMTPSA id E0824DF2A4; Wed, 9 May 2012 13:15:18 +0200 (CEST) Received: from teythoon by thinkbox.jade-hamburg.de with local (Exim 4.77) (envelope-from ) id 1SS4rj-0003cf-4R; Wed, 09 May 2012 13:15:31 +0200 From: Justus Winter <4winter@informatik.uni-hamburg.de> To: notmuch@notmuchmail.org Subject: [PATCH 4/5] go: update the build system Date: Wed, 9 May 2012 13:15:19 +0200 Message-Id: <1336562120-13837-5-git-send-email-4winter@informatik.uni-hamburg.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1336562120-13837-1-git-send-email-4winter@informatik.uni-hamburg.de> References: <20120505111535.3687.9018@thinkbox.jade-hamburg.de> <1336562120-13837-1-git-send-email-4winter@informatik.uni-hamburg.de> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2012 11:15:46 -0000 The new "go" utility does not require any Makefiles to compile go packages and programs. Remove the old Makefiles and replace the top level Makefile with one defining some convenience targets for compiling the notmuch bindings and the notmuch-addrlookup utility. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de> --- bindings/go/Makefile | 70 ++++++++++++++++++++++++++------------------- bindings/go/cmds/Makefile | 11 ------- bindings/go/pkg/Makefile | 17 ----------- 3 files changed, 40 insertions(+), 58 deletions(-) delete mode 100644 bindings/go/cmds/Makefile delete mode 100644 bindings/go/pkg/Makefile diff --git a/bindings/go/Makefile b/bindings/go/Makefile index aba2d59..c38f234 100644 --- a/bindings/go/Makefile +++ b/bindings/go/Makefile @@ -1,30 +1,40 @@ -# Copyright 2009 The Go Authors. All rights reserved. -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file. - -include ${GOROOT}/src/Make.inc - -all: install - -DIRS=\ - pkg\ - cmds\ - - -clean.dirs: $(addsuffix .clean, $(DIRS)) -install.dirs: $(addsuffix .install, $(DIRS)) -nuke.dirs: $(addsuffix .nuke, $(DIRS)) -test.dirs: $(addsuffix .test, $(TEST)) -bench.dirs: $(addsuffix .bench, $(BENCH)) - -%.clean: - +cd $* && $(QUOTED_GOBIN)/gomake clean - -%.install: - +cd $* && $(QUOTED_GOBIN)/gomake install - -clean: clean.dirs - -install: install.dirs - -#-include ${GOROOT}/src/Make.deps +# 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 src/github.com/kless/goconfig/config ]; then \ + $(GO) get github.com/kless/goconfig/config; \ + 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 diff --git a/bindings/go/cmds/Makefile b/bindings/go/cmds/Makefile deleted file mode 100644 index afbc6d2..0000000 --- a/bindings/go/cmds/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright 2009 The Go Authors. All rights reserved. -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file. - -include ${GOROOT}/src/Make.inc - -TARG=notmuch-addrlookup -GOFILES=\ - notmuch-addrlookup.go - -include ${GOROOT}/src/Make.cmd diff --git a/bindings/go/pkg/Makefile b/bindings/go/pkg/Makefile deleted file mode 100644 index de89dbc..0000000 --- a/bindings/go/pkg/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2009 The Go Authors. All rights reserved. -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file. - -include $(GOROOT)/src/Make.inc - -TARG=notmuch -CGOFILES=notmuch.go -CGO_LDFLAGS=-lnotmuch - -CLEANFILES+=notmuch_test - -include $(GOROOT)/src/Make.pkg - -%: install %.go - $(GC) $*.go - $(LD) -o $@ $*.$O -- 1.7.10