Handle removing doc term at current TermIterator position
[xapian.git] / xapian-bindings / generic / generic.mk
blob31c4bcc23eeb08e6c6839d50daa8d8629cc0370b
1 ## Makefile fragment included from each language binding directory which uses
2 ## SWIG. Any makefile rules or variables which should be set for all SWIG
3 ## bindings should be placed here.
5 if MAINTAINER_MODE
6 # Export these so that we run the locally installed autotools when building
7 # from a bootstrapped git tree.
8 export ACLOCAL AUTOCONF AUTOHEADER AUTOM4TE AUTOMAKE
9 endif
11 if NEED_INTREE_DYLD
12 # This is a hack for Mac OS X to work around "System Integrity Protection"
13 # which strips DYLD_* variables from the environment when running binaries
14 # in system bin directories. This totally breaks running in-tree tests
15 # against system interpreters (e.g. /usr/bin/python), but even for an
16 # interpreter installed elsewhere we need to take special care because
17 # /bin/sh is also affected. The trick we use is to define a variable
18 # which expands to the code needed to set DYLD_LIBRARY_PATH and inject
19 # this right when we run the interpreter.
20 export OSX_SIP_HACK_ENV=env DYLD_LIBRARY_PATH=$(INTREE_DYLD_PATH)
21 endif
23 if OVERRIDE_MACOSX_DEPLOYMENT_TARGET
24 # This requires GNU make, but apparently that's the default on OS X.
25 export MACOSX_DEPLOYMENT_TARGET=@OVERRIDE_MACOSX_DEPLOYMENT_TARGET@
26 endif
28 # Define separately to allow overriding easily with: make SWIG_WERROR=
29 SWIG_WERROR = -Werror
31 # Recover from the removal of $@. A full explanation of this is in the
32 # automake manual under the heading "Multiple Outputs".
33 make_many_locked = \
34 @if test -f $@; then :; else \
35 trap 'rm -rf "$(stamp)-lck" "$(stamp)"' 1 2 13 15; \
36 if mkdir '$(stamp)-lck' 2>/dev/null; then \
37 rm -f '$(stamp)'; \
38 $(MAKE) $(AM_MAKEFLAGS) '$(stamp)'; \
39 result=$$?; rm -rf '$(stamp)-lck'; exit $$result; \
40 else \
41 while test -d '$(stamp)-lck'; do sleep 1; done; \
42 test -f '$(stamp)'; \
43 fi; \
46 multitarget_begin = @rm -f $@-t; touch $@-t
47 multitarget_end = @mv -f $@-t $@