]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/Makefile.local
build: integrate building ruby bindings into notmuch build process
[notmuch] / bindings / Makefile.local
diff --git a/bindings/Makefile.local b/bindings/Makefile.local
new file mode 100644 (file)
index 0000000..16817f5
--- /dev/null
@@ -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)