summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorReid Barton <rwbarton@gmail.com>2015-01-12 10:56:58 -0500
committerReid Barton <rwbarton@gmail.com>2015-01-12 10:56:58 -0500
commitfe0d289de466b0c34a04350c6f7c096d9a588ad0 (patch)
treeac097db1aa142dd2738e2e170611cd967974eb7b /rules
parentc506f254b8e14fe422186322a580f9f7effca7f8 (diff)
downloadhaskell-fe0d289de466b0c34a04350c6f7c096d9a588ad0.tar.gz
inplace: Don't add empty component to LD_LIBRARY_PATH when it is empty
Summary: Avoids a confusing inconsistency when testing #9386 (about ghci finding .so files in .). Test Plan: validate Reviewers: austin Reviewed By: austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D593 GHC Trac Issues: #9386
Diffstat (limited to 'rules')
-rw-r--r--rules/library-path.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules/library-path.mk b/rules/library-path.mk
index 5dd55887b7..dbfd4be226 100644
--- a/rules/library-path.mk
+++ b/rules/library-path.mk
@@ -14,8 +14,8 @@
ifeq "$(TargetOS_CPP)" "mingw32"
prependLibraryPath = $(error Do not know how to prependLibraryPath on Windows)
else ifeq "$(TargetOS_CPP)" "darwin"
-prependLibraryPath = export DYLD_LIBRARY_PATH="$1:$$DYLD_LIBRARY_PATH"
+prependLibraryPath = export DYLD_LIBRARY_PATH="$1$${DYLD_LIBRARY_PATH:+:$$DYLD_LIBRARY_PATH}"
else
-prependLibraryPath = export LD_LIBRARY_PATH="$1:$$LD_LIBRARY_PATH"
+prependLibraryPath = export LD_LIBRARY_PATH="$1$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH}"
endif