File: generic.mk

package info (click to toggle)
xapian-bindings 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 18,376 kB
  • sloc: cpp: 323,265; cs: 9,646; java: 7,153; python: 5,493; sh: 5,012; perl: 4,455; makefile: 1,146; ruby: 1,027; php: 588; tcl: 262
file content (42 lines) | stat: -rw-r--r-- 1,689 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
## Makefile fragment included from each language binding directory which uses
## SWIG.  Any makefile rules or variables which should be set for all SWIG
## bindings should be placed here.

if MAINTAINER_MODE
# Export these so that we run the locally installed autotools when building
# from a bootstrapped git tree.
export ACLOCAL AUTOCONF AUTOHEADER AUTOM4TE AUTOMAKE
endif

if NEED_INTREE_DYLD
# This is a hack for macOS to work around "System Integrity Protection"
# which strips DYLD_* variables from the environment when running binaries
# in system bin directories.  This totally breaks running in-tree tests
# against system interpreters (e.g. /usr/bin/python), but even for an
# interpreter installed elsewhere we need to take special care because
# /bin/sh is also affected.  The trick we use is to define a variable
# which expands to the code needed to set DYLD_LIBRARY_PATH and inject
# this right when we run the interpreter.
export MACOS_SIP_HACK_ENV=env DYLD_LIBRARY_PATH=$(INTREE_DYLD_PATH)
endif

# Define separately to allow overriding easily with: make SWIG_WERROR=
SWIG_WERROR = -Werror

# Recover from the removal of $@.  A full explanation of this is in the
# automake manual under the heading "Multiple Outputs".
make_many_locked = \
@if test -f $@; then :; else \
  trap 'rm -rf "$(stamp)-lck" "$(stamp)"' 1 2 13 15; \
  if mkdir '$(stamp)-lck' 2>/dev/null; then \
    rm -f '$(stamp)'; \
    $(MAKE) $(AM_MAKEFLAGS) '$(stamp)'; \
    result=$$?; rm -rf '$(stamp)-lck'; exit $$result; \
  else \
    while test -d '$(stamp)-lck'; do sleep 1; done; \
    test -f '$(stamp)'; \
  fi; \
fi

multitarget_begin = @rm -f $@-t; touch $@-t
multitarget_end = @mv -f $@-t $@