blob: bdf34d1859676f64b69dd5685d2fac8aee389f04 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001From 27ae7b18078d801a2c943aa6de2f7e9808177251 Mon Sep 17 00:00:00 2001
2From: Brendan O'Dea <bod@debian.org>
3Date: Fri, 18 Mar 2005 22:22:25 +1100
4Subject: Postpone LD_LIBRARY_PATH evaluation to the binary targets.
5
6Modify the setting of LD_LIBRARY_PATH to append pre-existing values at the
7time the rule is evaluated rather than when the Makefile is created.
8
9This is required when building packages with dpkg-buildpackage and fakeroot,
10since fakeroot (which now sets LD_LIBRARY_PATH) is not used for the "build"
11rule where the Makefile is created, but is for the clean/binary* targets.
12
13Patch-Name: debian/fakeroot.diff
Brad Bishopd7bf8c12018-02-25 22:55:05 -050014Upstream-Status: Pending
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015---
16 Makefile.SH | 7 ++-----
17 1 file changed, 2 insertions(+), 5 deletions(-)
18
19diff --git a/Makefile.SH b/Makefile.SH
20index 034d812..04dd7d5 100755
21--- a/Makefile.SH
22+++ b/Makefile.SH
23@@ -39,10 +39,7 @@ case "$useshrplib" in
24 true)
25 # Prefix all runs of 'miniperl' and 'perl' with
26 # $ldlibpth so that ./perl finds *this* shared libperl.
27- case "$LD_LIBRARY_PATH" in
28- '') ldlibpth="LD_LIBRARY_PATH=` quote "$pwd" `" ;;
29- *) ldlibpth="LD_LIBRARY_PATH=` quote "$pwd" `:` quote "$LD_LIBRARY_PATH" `" ;;
30- esac
31+ ldlibpth="LD_LIBRARY_PATH=` quote "$pwd" `"'$${LD_LIBRARY_PATH:+:}$$LD_LIBRARY_PATH'
32
33 pldlflags="$cccdlflags"
34 static_ldflags=''
35@@ -113,7 +110,7 @@ true)
36 ;;
37 esac
38 case "$ldlibpthname" in
39- '') ;;
40+ ''|LD_LIBRARY_PATH) ;;
41 *)
42 case "$osname" in
43 os2)