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