1 Return-Path: <bremner@tesseract.cs.unb.ca>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 80AB1431FBC
\r
6 for <notmuch@notmuchmail.org>; Fri, 6 Mar 2015 13:59:20 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=2.438 tagged_above=-999 required=5
\r
12 tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id bpSRaYYFulie for <notmuch@notmuchmail.org>;
\r
16 Fri, 6 Mar 2015 13:59:20 -0800 (PST)
\r
17 Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net
\r
19 (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id DFA9D431FAE
\r
22 for <notmuch@notmuchmail.org>; Fri, 6 Mar 2015 13:59:19 -0800 (PST)
\r
23 Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim
\r
24 4.80) (envelope-from <bremner@tesseract.cs.unb.ca>)
\r
25 id 1YU0GT-0000RN-0u; Fri, 06 Mar 2015 21:58:37 +0000
\r
26 Received: (nullmailer pid 30535 invoked by uid 1000); Fri, 06 Mar 2015
\r
28 From: David Bremner <david@tethera.net>
\r
29 To: notmuch@notmuchmail.org
\r
30 Subject: [Patch v2 1/4] build: integrate building ruby bindings into notmuch
\r
32 Date: Fri, 6 Mar 2015 22:57:50 +0100
\r
33 Message-Id: <1425679073-30439-2-git-send-email-david@tethera.net>
\r
34 X-Mailer: git-send-email 2.1.4
\r
35 In-Reply-To: <1425679073-30439-1-git-send-email-david@tethera.net>
\r
36 References: <1420114600-28396-6-git-send-email-david@tethera.net>
\r
37 <1425679073-30439-1-git-send-email-david@tethera.net>
\r
38 X-BeenThere: notmuch@notmuchmail.org
\r
39 X-Mailman-Version: 2.1.13
\r
41 List-Id: "Use and development of the notmuch mail system."
\r
42 <notmuch.notmuchmail.org>
\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
46 List-Post: <mailto:notmuch@notmuchmail.org>
\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
50 X-List-Received-Date: Fri, 06 Mar 2015 21:59:20 -0000
\r
52 Because ruby generates a Makefile, we have to use recursive make.
\r
53 Because mkmf.rb hardcodes the name Makefile, put our Makefile{.local}
\r
54 in the parent directory.
\r
56 Makefile.local | 2 +-
\r
57 bindings/Makefile | 7 +++++++
\r
58 bindings/Makefile.local | 18 ++++++++++++++++++
\r
59 bindings/ruby/README | 8 ++++++++
\r
60 configure | 18 ++++++++++++++++++
\r
62 6 files changed, 52 insertions(+), 2 deletions(-)
\r
63 create mode 100644 bindings/Makefile
\r
64 create mode 100644 bindings/Makefile.local
\r
65 create mode 100644 bindings/ruby/README
\r
67 diff --git a/Makefile.local b/Makefile.local
\r
68 index 81ee347..7204267 100644
\r
69 --- a/Makefile.local
\r
70 +++ b/Makefile.local
\r
71 @@ -59,7 +59,7 @@ endif
\r
72 FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(AS_NEEDED_LDFLAGS) $(CONFIGURE_LDFLAGS)
\r
75 -all: notmuch notmuch-shared build-man
\r
76 +all: notmuch notmuch-shared build-man ruby-bindings
\r
77 ifeq ($(MAKECMDGOALS),)
\r
78 ifeq ($(shell cat .first-build-message 2>/dev/null),)
\r
79 @NOTMUCH_FIRST_BUILD=1 $(MAKE) --no-print-directory all
\r
80 diff --git a/bindings/Makefile b/bindings/Makefile
\r
81 new file mode 100644
\r
82 index 0000000..de492a7
\r
84 +++ b/bindings/Makefile
\r
86 +# See Makefile.local for the list of files to be compiled in this
\r
93 diff --git a/bindings/Makefile.local b/bindings/Makefile.local
\r
94 new file mode 100644
\r
95 index 0000000..6ed1344
\r
97 +++ b/bindings/Makefile.local
\r
103 +# force the shared library to be build
\r
104 +ruby-bindings: lib/libnotmuch.so
\r
105 +ifeq ($(HAVE_RUBY_DEV),1)
\r
106 + cd $(dir)/ruby && ruby extconf.rb --vendor
\r
107 + $(MAKE) -C $(dir)/ruby
\r
109 + @echo Missing dependency, skipping ruby bindings
\r
112 +CLEAN += $(patsubst %,$(dir)/ruby/%, \
\r
113 + Makefile database.o directory.o filenames.o\
\r
114 + init.o message.o messages.o mkmf.log notmuch.so query.o \
\r
115 + status.o tags.o thread.o threads.o)
\r
117 diff --git a/bindings/ruby/README b/bindings/ruby/README
\r
118 new file mode 100644
\r
119 index 0000000..fe4ff89
\r
121 +++ b/bindings/ruby/README
\r
123 +To build the the notmuch ruby extension, run the following commands
\r
124 +from the *top level* notmuch source directory:
\r
127 +% make ruby-bindings
\r
129 +The generic documentation about building notmuch also applies.
\r
131 diff --git a/configure b/configure
\r
132 index 4af7ba9..3ca9bed 100755
\r
135 @@ -21,6 +21,7 @@ srcdir=$(dirname "$0")
\r
137 subdirs="util compat lib parse-time-string completion doc emacs"
\r
138 subdirs="${subdirs} performance-test test test/test-databases"
\r
139 +subdirs="${subdirs} bindings"
\r
141 # For a non-srcdir configure invocation (such as ../configure), create
\r
142 # the directory structure and copy Makefiles.
\r
143 @@ -443,6 +444,15 @@ else
\r
147 +printf "Checking for ruby development files... "
\r
148 +if ruby -e "require 'mkmf'"> /dev/null 2>&1; then
\r
152 + printf "No (skipping ruby bindings)\n"
\r
156 printf "Checking if sphinx is available and supports nroff output... "
\r
157 if command -v sphinx-build > /dev/null && ${python} -m sphinx.writers.manpage > /dev/null 2>&1 ; then
\r
159 @@ -858,6 +868,10 @@ HAVE_CANONICALIZE_FILE_NAME = ${have_canonicalize_file_name}
\r
160 # build its own version)
\r
161 HAVE_GETLINE = ${have_getline}
\r
163 +# Are the ruby development files (and ruby) available? If not skip
\r
164 +# building/testing ruby bindings.
\r
165 +HAVE_RUBY_DEV = ${have_ruby_dev}
\r
167 # Whether the strcasestr function is available (if not, then notmuch will
\r
168 # build its own version)
\r
169 HAVE_STRCASESTR = ${have_strcasestr}
\r
170 @@ -970,6 +984,10 @@ NOTMUCH_HAVE_MAN=$((have_sphinx))
\r
172 # Name of python interpreter
\r
173 NOTMUCH_PYTHON=${python}
\r
175 +# Are the ruby development files (and ruby) available? If not skip
\r
176 +# building/testing ruby bindings.
\r
177 +NOTMUCH_HAVE_RUBY_DEV=${have_ruby_dev}
\r
180 # Finally, after everything configured, inform the user how to continue.
\r
181 diff --git a/debian/rules b/debian/rules
\r
182 index 7a19445..ca85bc7 100755
\r
185 @@ -12,7 +12,6 @@ override_dh_auto_build:
\r
186 dh_auto_build -- V=1
\r
187 dh_auto_build --sourcedirectory bindings/python
\r
188 cd bindings/python && $(python3_all) setup.py build
\r
189 - cd bindings/ruby && ruby extconf.rb --vendor && make
\r
190 $(MAKE) -C contrib/notmuch-mutt
\r
192 override_dh_auto_clean:
\r