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 arlo.cworth.org (Postfix) with ESMTP id 05C7C6DE1995
\r
6 for <notmuch@notmuchmail.org>; Mon, 1 Jun 2015 00:11:28 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=0.26 tagged_above=-999 required=5 tests=[AWL=0.250,
\r
12 T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled
\r
13 Received: from arlo.cworth.org ([127.0.0.1])
\r
14 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id A18Pd7zox95V for <notmuch@notmuchmail.org>;
\r
16 Mon, 1 Jun 2015 00:11:26 -0700 (PDT)
\r
17 Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net
\r
19 by arlo.cworth.org (Postfix) with ESMTPS id 306BE6DE1833
\r
20 for <notmuch@notmuchmail.org>; Mon, 1 Jun 2015 00:11:26 -0700 (PDT)
\r
21 Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim
\r
22 4.80) (envelope-from <bremner@tesseract.cs.unb.ca>)
\r
23 id 1YzJrw-0007PG-M0; Mon, 01 Jun 2015 07:10:44 +0000
\r
24 Received: (nullmailer pid 2449 invoked by uid 1000); Mon, 01 Jun 2015
\r
26 From: David Bremner <david@tethera.net>
\r
27 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
\r
28 Subject: [patch v3 1/4] build: integrate building ruby bindings into notmuch
\r
30 Date: Mon, 1 Jun 2015 09:08:59 +0200
\r
31 Message-Id: <1433142542-2307-2-git-send-email-david@tethera.net>
\r
32 X-Mailer: git-send-email 2.1.4
\r
33 In-Reply-To: <1433142542-2307-1-git-send-email-david@tethera.net>
\r
34 References: <1425679073-30439-5-git-send-email-david@tethera.net>
\r
35 <1433142542-2307-1-git-send-email-david@tethera.net>
\r
36 X-BeenThere: notmuch@notmuchmail.org
\r
37 X-Mailman-Version: 2.1.18
\r
39 List-Id: "Use and development of the notmuch mail system."
\r
40 <notmuch.notmuchmail.org>
\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
42 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
44 List-Post: <mailto:notmuch@notmuchmail.org>
\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
48 X-List-Received-Date: Mon, 01 Jun 2015 07:11:28 -0000
\r
50 Because ruby generates a Makefile, we have to use recursive make.
\r
51 Because mkmf.rb hardcodes the name Makefile, put our Makefile{.local}
\r
52 in the parent directory.
\r
54 Makefile.local | 2 +-
\r
55 bindings/Makefile | 7 +++++++
\r
56 bindings/Makefile.local | 19 +++++++++++++++++++
\r
57 bindings/ruby/README | 8 ++++++++
\r
58 configure | 18 ++++++++++++++++++
\r
60 6 files changed, 53 insertions(+), 2 deletions(-)
\r
61 create mode 100644 bindings/Makefile
\r
62 create mode 100644 bindings/Makefile.local
\r
63 create mode 100644 bindings/ruby/README
\r
65 diff --git a/Makefile.local b/Makefile.local
\r
66 index 6d54742..61a9c4c 100644
\r
67 --- a/Makefile.local
\r
68 +++ b/Makefile.local
\r
69 @@ -59,7 +59,7 @@ endif
\r
70 FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(AS_NEEDED_LDFLAGS) $(CONFIGURE_LDFLAGS)
\r
73 -all: notmuch notmuch-shared build-man
\r
74 +all: notmuch notmuch-shared build-man ruby-bindings
\r
75 ifeq ($(MAKECMDGOALS),)
\r
76 ifeq ($(shell cat .first-build-message 2>/dev/null),)
\r
77 @NOTMUCH_FIRST_BUILD=1 $(MAKE) --no-print-directory all
\r
78 diff --git a/bindings/Makefile b/bindings/Makefile
\r
79 new file mode 100644
\r
80 index 0000000..de492a7
\r
82 +++ b/bindings/Makefile
\r
84 +# See Makefile.local for the list of files to be compiled in this
\r
91 diff --git a/bindings/Makefile.local b/bindings/Makefile.local
\r
92 new file mode 100644
\r
93 index 0000000..e0b0bf0
\r
95 +++ b/bindings/Makefile.local
\r
101 +# force the shared library to be built
\r
102 +ruby-bindings: lib/libnotmuch.so
\r
103 +ifeq ($(HAVE_RUBY_DEV),1)
\r
104 + cd $(dir)/ruby && ruby extconf.rb --vendor
\r
105 + $(MAKE) -C $(dir)/ruby
\r
107 + @echo Missing dependency, skipping ruby bindings
\r
110 +CLEAN += $(patsubst %,$(dir)/ruby/%, \
\r
111 + .RUBYARCHDIR.time \
\r
112 + Makefile database.o directory.o filenames.o\
\r
113 + init.o message.o messages.o mkmf.log notmuch.so query.o \
\r
114 + status.o tags.o thread.o threads.o)
\r
116 diff --git a/bindings/ruby/README b/bindings/ruby/README
\r
117 new file mode 100644
\r
118 index 0000000..fe4ff89
\r
120 +++ b/bindings/ruby/README
\r
122 +To build the the notmuch ruby extension, run the following commands
\r
123 +from the *top level* notmuch source directory:
\r
126 +% make ruby-bindings
\r
128 +The generic documentation about building notmuch also applies.
\r
130 diff --git a/configure b/configure
\r
131 index 2065fcd..5a862b1 100755
\r
134 @@ -21,6 +21,7 @@ srcdir=$(dirname "$0")
\r
136 subdirs="util compat lib parse-time-string completion doc emacs"
\r
137 subdirs="${subdirs} performance-test test test/test-databases"
\r
138 +subdirs="${subdirs} bindings"
\r
140 # For a non-srcdir configure invocation (such as ../configure), create
\r
141 # the directory structure and copy Makefiles.
\r
142 @@ -473,6 +474,15 @@ else
\r
146 +printf "Checking for ruby development files... "
\r
147 +if ruby -e "require 'mkmf'"> /dev/null 2>&1; then
\r
151 + printf "No (skipping ruby bindings)\n"
\r
155 printf "Checking if sphinx is available and supports nroff output... "
\r
156 if command -v sphinx-build > /dev/null && ${python} -m sphinx.writers.manpage > /dev/null 2>&1 ; then
\r
158 @@ -886,6 +896,10 @@ HAVE_CANONICALIZE_FILE_NAME = ${have_canonicalize_file_name}
\r
159 # build its own version)
\r
160 HAVE_GETLINE = ${have_getline}
\r
162 +# Are the ruby development files (and ruby) available? If not skip
\r
163 +# building/testing ruby bindings.
\r
164 +HAVE_RUBY_DEV = ${have_ruby_dev}
\r
166 # Whether the strcasestr function is available (if not, then notmuch will
\r
167 # build its own version)
\r
168 HAVE_STRCASESTR = ${have_strcasestr}
\r
169 @@ -998,6 +1012,10 @@ NOTMUCH_HAVE_MAN=$((have_sphinx))
\r
171 # Name of python interpreter
\r
172 NOTMUCH_PYTHON=${python}
\r
174 +# Are the ruby development files (and ruby) available? If not skip
\r
175 +# building/testing ruby bindings.
\r
176 +NOTMUCH_HAVE_RUBY_DEV=${have_ruby_dev}
\r
179 # Finally, after everything configured, inform the user how to continue.
\r
180 diff --git a/debian/rules b/debian/rules
\r
181 index 56378ec..04f0062 100755
\r
184 @@ -19,7 +19,6 @@ override_dh_auto_build:
\r
185 dh_auto_build -- V=1
\r
186 dh_auto_build --sourcedirectory bindings/python
\r
187 cd bindings/python && $(python3_all) setup.py build
\r
188 - cd bindings/ruby && ruby extconf.rb --vendor && make
\r
189 $(MAKE) -C contrib/notmuch-mutt
\r
191 override_dh_auto_clean:
\r