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.
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
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
)
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@
28 # Define separately to allow overriding easily with: make SWIG_WERROR=
31 # Recover from the removal of $@. A full explanation of this is in the
32 # automake manual under the heading "Multiple Outputs".
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 \
38 $(MAKE
) $(AM_MAKEFLAGS
) '$(stamp)'; \
39 result
=$$?
; rm -rf
'$(stamp)-lck'; exit
$$result; \
41 while
test -d
'$(stamp)-lck'; do sleep
1; done
; \
46 multitarget_begin
= @
rm -f
$@
-t
; touch
$@
-t
47 multitarget_end
= @mv
-f
$@
-t
$@