CLI: set NOTMUCH_CONFIG in hooks.
[notmuch] / bindings / Makefile.local
1 # -*- makefile-gmake -*-
2
3 dir := bindings
4
5 # force the shared library to be built
6 ruby-bindings: $(dir)/ruby.stamp
7
8 $(dir)/ruby.stamp: lib/$(LINKER_NAME)
9 ifeq ($(HAVE_RUBY_DEV),1)
10         cd $(dir)/ruby && \
11                 EXTRA_LDFLAGS="$(NO_UNDEFINED_LDFLAGS)" \
12                 LIBNOTMUCH="../../lib/$(LINKER_NAME)" \
13                 NOTMUCH_SRCDIR='$(NOTMUCH_SRCDIR)' \
14                 $(RUBY) extconf.rb --vendor
15         $(MAKE) -C $(dir)/ruby CFLAGS="$(CFLAGS) -pipe -fno-plt -fPIC" && touch $@
16 endif
17
18 python-cffi-bindings: $(dir)/python-cffi.stamp
19
20 $(dir)/python-cffi.stamp: lib/$(LINKER_NAME)
21 ifeq ($(HAVE_PYTHON3_CFFI),1)
22         cd $(dir)/python-cffi && \
23                 ${PYTHON} setup.py build --build-lib build/stage && \
24                 mkdir -p build/stage/tests && cp tests/*.py build/stage/tests && \
25                 touch ../python-cffi.stamp
26 endif
27
28 CLEAN += $(patsubst %,$(dir)/ruby/%, \
29         .RUBYARCHDIR.time \
30         Makefile database.o directory.o filenames.o\
31         init.o message.o messages.o mkmf.log notmuch.so query.o \
32         status.o tags.o thread.o threads.o)
33
34 CLEAN += bindings/ruby/.vendorarchdir.time $(dir)/ruby.stamp
35
36 CLEAN += bindings/python-cffi/build $(dir)/python-cffi.stamp