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 28497429E30
\r
6 for <notmuch@notmuchmail.org>; Tue, 30 Dec 2014 12:30:43 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 mDyxwgllZz7r for <notmuch@notmuchmail.org>;
\r
16 Tue, 30 Dec 2014 12:30:42 -0800 (PST)
\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])
\r
18 (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 9042B431FD4
\r
21 for <notmuch@notmuchmail.org>; Tue, 30 Dec 2014 12:30:41 -0800 (PST)
\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)
\r
23 (envelope-from <bremner@tesseract.cs.unb.ca>)
\r
24 id 1Y63RB-00010C-7k; Tue, 30 Dec 2014 16:30:41 -0400
\r
25 Received: (nullmailer pid 10591 invoked by uid 1000); Tue, 30 Dec 2014
\r
27 From: David Bremner <david@tethera.net>
\r
28 To: notmuch@notmuchmail.org
\r
29 Subject: [Patch v2 1/5] build: integrate building ruby bindings into notmuch
\r
31 Date: Tue, 30 Dec 2014 21:29:36 +0100
\r
32 Message-Id: <1419971380-10307-2-git-send-email-david@tethera.net>
\r
33 X-Mailer: git-send-email 2.1.3
\r
34 In-Reply-To: <1419971380-10307-1-git-send-email-david@tethera.net>
\r
35 References: <1419971380-10307-1-git-send-email-david@tethera.net>
\r
36 X-BeenThere: notmuch@notmuchmail.org
\r
37 X-Mailman-Version: 2.1.13
\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: Tue, 30 Dec 2014 20:30:43 -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 bindings/Makefile | 7 +++++++
\r
55 bindings/Makefile.local | 18 ++++++++++++++++++
\r
56 configure | 18 ++++++++++++++++++
\r
57 3 files changed, 43 insertions(+)
\r
58 create mode 100644 bindings/Makefile
\r
59 create mode 100644 bindings/Makefile.local
\r
61 diff --git a/bindings/Makefile b/bindings/Makefile
\r
62 new file mode 100644
\r
63 index 0000000..de492a7
\r
65 +++ b/bindings/Makefile
\r
67 +# See Makefile.local for the list of files to be compiled in this
\r
74 diff --git a/bindings/Makefile.local b/bindings/Makefile.local
\r
75 new file mode 100644
\r
76 index 0000000..f395c81
\r
78 +++ b/bindings/Makefile.local
\r
84 +# force the shared library to be build
\r
85 +ruby-bindings: lib/libnotmuch.so
\r
86 +ifeq ($(HAVE_RUBY_DEV),1)
\r
87 + cd $(dir)/ruby && ruby extconf.rb
\r
88 + $(MAKE) -C $(dir)/ruby
\r
90 + @echo Missing dependency, skipping ruby bindings
\r
93 +CLEAN += $(patsubst %,$(dir)/ruby/%, \
\r
94 + Makefile database.o directory.o filenames.o\
\r
95 + init.o message.o messages.o mkmf.log notmuch.so query.o \
\r
96 + status.o tags.o thread.o threads.o)
\r
98 diff --git a/configure b/configure
\r
99 index d14e7d1..7df3b29 100755
\r
102 @@ -21,6 +21,7 @@ srcdir=$(dirname "$0")
\r
104 subdirs="util compat lib parse-time-string completion doc emacs"
\r
105 subdirs="${subdirs} performance-test test test/test-databases"
\r
106 +subdirs="${subdirs} bindings"
\r
108 # For a non-srcdir configure invocation (such as ../configure), create
\r
109 # the directory structure and copy Makefiles.
\r
110 @@ -426,6 +427,15 @@ else
\r
114 +printf "Checking for ruby development files... "
\r
115 +if ruby -e "require 'mkmf'"> /dev/null 2>&1; then
\r
119 + printf "No (skipping ruby bindings)\n"
\r
123 printf "Checking if sphinx is available and supports nroff output... "
\r
124 if hash sphinx-build > /dev/null 2>&1 && python -m sphinx.writers.manpage > /dev/null 2>&1 ; then
\r
126 @@ -848,6 +858,10 @@ HAVE_CANONICALIZE_FILE_NAME = ${have_canonicalize_file_name}
\r
127 # build its own version)
\r
128 HAVE_GETLINE = ${have_getline}
\r
130 +# Are the ruby development files (and ruby) available? If not skip
\r
131 +# building/testing ruby bindings.
\r
132 +HAVE_RUBY_DEV = ${have_ruby_dev}
\r
134 # Whether the strcasestr function is available (if not, then notmuch will
\r
135 # build its own version)
\r
136 HAVE_STRCASESTR = ${have_strcasestr}
\r
137 @@ -958,6 +972,10 @@ NOTMUCH_HAVE_XAPIAN_COMPACT=${have_xapian_compact}
\r
138 # Whether there's either sphinx or rst2man available for building
\r
140 NOTMUCH_HAVE_MAN=$((have_sphinx || have_rst2man))
\r
142 +# Are the ruby development files (and ruby) available? If not skip
\r
143 +# building/testing ruby bindings.
\r
144 +NOTMUCH_HAVE_RUBY_DEV=${have_ruby_dev}
\r
147 # Finally, after everything configured, inform the user how to continue.
\r