make: do a better job of sanitizing LD_LIBRARY_PATH (fixes #8069)
authorFelix Fietkau <nbd@openwrt.org>
Thu, 17 May 2012 20:19:43 +0000 (20:19 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 17 May 2012 20:19:43 +0000 (20:19 +0000)
SVN-Revision: 31780

include/toplevel.mk

index 721d14c4864bd7431e3e8787fa566345c808825a..f4a2ee06038a95f0ca2f1d936e286de18d30dfcf 100644 (file)
@@ -22,8 +22,8 @@ export RELEASE
 export REVISION
 export OPENWRTVERSION
 export IS_TTY=$(shell tty -s && echo 1 || echo 0)
-export LD_LIBRARY_PATH:=$(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):)$(STAGING_DIR_HOST)/lib
-export DYLD_LIBRARY_PATH:=$(if $(DYLD_LIBRARY_PATH),$(DYLD_LIBRARY_PATH):)$(STAGING_DIR_HOST)/lib
+export LD_LIBRARY_PATH:=$(subst ::,:,$(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):)$(STAGING_DIR_HOST)/lib)
+export DYLD_LIBRARY_PATH:=$(subst ::,:,$(if $(DYLD_LIBRARY_PATH),$(DYLD_LIBRARY_PATH):)$(STAGING_DIR_HOST)/lib)
 export GIT_CONFIG_PARAMETERS='core.autocrlf=false'
 
 # prevent perforce from messing with the patch utility