aboutsummaryrefslogtreecommitdiff
path: root/bindings/Makefile.local
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2015-06-01 09:08:59 +0200
committerDavid Bremner <david@tethera.net>2015-06-12 09:12:28 +0200
commitd038b9320949c79503fe4b76870aaabf279405ab (patch)
treecc37e58cf542034e0a6cab77668aa8b58950e87a /bindings/Makefile.local
parent32fd74b7aa9c24ec77f8c59d09f89e0535bf64cd (diff)
build: integrate building ruby bindings into notmuch build process
Because ruby generates a Makefile, we have to use recursive make. Because mkmf.rb hardcodes the name Makefile, put our Makefile{.local} in the parent directory.
Diffstat (limited to 'bindings/Makefile.local')
-rw-r--r--bindings/Makefile.local18
1 files changed, 18 insertions, 0 deletions
diff --git a/bindings/Makefile.local b/bindings/Makefile.local
new file mode 100644
index 00000000..16817f5a
--- /dev/null
+++ b/bindings/Makefile.local
@@ -0,0 +1,18 @@
+# -*- makefile -*-
+
+dir := bindings
+
+# force the shared library to be built
+ruby-bindings: lib/libnotmuch.so
+ifeq ($(HAVE_RUBY_DEV),1)
+ cd $(dir)/ruby && ruby extconf.rb --vendor
+ $(MAKE) -C $(dir)/ruby
+else
+ @echo Missing dependency, skipping ruby bindings
+endif
+
+CLEAN += $(patsubst %,$(dir)/ruby/%, \
+ .RUBYARCHDIR.time \
+ Makefile database.o directory.o filenames.o\
+ init.o message.o messages.o mkmf.log notmuch.so query.o \
+ status.o tags.o thread.o threads.o)