Drop special handling of MACOSX_DEPLOYMENT_TARGET
[xapian.git] / xapian-bindings / generic / generic.mk
blob6cb0065ad6ac993f89c2c7690bc60e61c43c4853
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 macOS 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 MACOS_SIP_HACK_ENV=env DYLD_LIBRARY_PATH=$(INTREE_DYLD_PATH)
21 endif
23 # Define separately to allow overriding easily with: make SWIG_WERROR=
24 SWIG_WERROR = -Werror
26 # Recover from the removal of $@. A full explanation of this is in the
27 # automake manual under the heading "Multiple Outputs".
28 make_many_locked = \
29 @if test -f $@; then :; else \
30 trap 'rm -rf "$(stamp)-lck" "$(stamp)"' 1 2 13 15; \
31 if mkdir '$(stamp)-lck' 2>/dev/null; then \
32 rm -f '$(stamp)'; \
33 $(MAKE) $(AM_MAKEFLAGS) '$(stamp)'; \
34 result=$$?; rm -rf '$(stamp)-lck'; exit $$result; \
35 else \
36 while test -d '$(stamp)-lck'; do sleep 1; done; \
37 test -f '$(stamp)'; \
38 fi; \
41 multitarget_begin = @rm -f $@-t; touch $@-t
42 multitarget_end = @mv -f $@-t $@