Modify the setting of LD_LIBRARY_PATH to append pre-existing values at the
time the rule is evaluated rather than when the Makefile is created.

This is required when building packages with dpkg-buildpackage and fakeroot,
since fakeroot (which now sets LD_LIBRARY_PATH) is not used for the "build"
rule where the Makefile is created, but is for the clean/binary* targets.

diff -Naur --exclude=debian perl-5.8.8.orig/Makefile.SH perl-5.8.8/Makefile.SH
--- perl-5.8.8.orig/Makefile.SH	2006-01-24 23:49:44.000000000 +1100
+++ perl-5.8.8/Makefile.SH	2006-02-02 23:40:37.000000000 +1100
@@ -43,12 +43,7 @@
 true)
 	# Prefix all runs of 'miniperl' and 'perl' with
 	# $ldlibpth so that ./perl finds *this* shared libperl.
-	case "$LD_LIBRARY_PATH" in
-	'')
-		ldlibpth="LD_LIBRARY_PATH=`pwd`";;
-	*)
-		ldlibpth="LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}";;
-	esac
+	ldlibpth=LD_LIBRARY_PATH=`pwd`'$${LD_LIBRARY_PATH:+:}$$LD_LIBRARY_PATH'
 
 	pldlflags="$cccdlflags"
 	static_target='static_pic'
@@ -101,7 +96,7 @@
 	    ;;
 	esac
 	case "$ldlibpthname" in
-	'') ;;
+	''|LD_LIBRARY_PATH) ;;
 	*)
 	    case "$osname" in
 	    os2)
