about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2013-07-09 15:31:43 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2013-07-09 15:31:43 +0200
commitace49442a6aef323d42700da169ac3de32d64c2d (patch)
treede265ced1d72ac84026a07f3e2ac2f04d38de5c4
parent25f51eeda079382773c0f3b91f43603432c44132 (diff)
downloadrust-ace49442a6aef323d42700da169ac3de32d64c2d.tar.gz
rust-ace49442a6aef323d42700da169ac3de32d64c2d.zip
Fix #3225: Incorporate feedback from Graydon.
This is a small follow-up fix to the previous commit: I needed
to quote the right-hand side of the definition for the variable
MATCHES, to handle the case where there are more than one previously
installed libraries in the target directory.
-rw-r--r--mk/install.mk22
1 files changed, 11 insertions, 11 deletions
diff --git a/mk/install.mk b/mk/install.mk
index ff9b4c65247..6745535fbca 100644
--- a/mk/install.mk
+++ b/mk/install.mk
@@ -38,18 +38,18 @@ endif
 # Target-specific $(LIB_DESTIN_DIR) is the destination directory
 # $(1) is the filename/libname-glob
 define INSTALL_LIB
-  $(if $(filter-out 1,$(words $(wildcard $(LIB_SOURCE_DIR)/$(1)))),      \
-       $(error Aborting install because more than one library matching   \
-               $(1) is present in build tree $(LIB_SOURCE_DIR):          \
+  $(if $(filter-out 1,$(words $(wildcard $(LIB_SOURCE_DIR)/$(1)))),        \
+       $(error Aborting install because more than one library matching     \
+               $(1) is present in build tree $(LIB_SOURCE_DIR):            \
                $(wildcard $(LIB_SOURCE_DIR)/$(1))))
-  $(Q)LIB_NAME=$(notdir $(lastword $(wildcard $(LIB_SOURCE_DIR)/$(1)))); \
-  MATCHES=$(filter-out %$(notdir $(lastword $(wildcard $(LIB_SOURCE_DIR)/$(1)))),\
-                        $(wildcard $(LIB_DESTIN_DIR)/$(1)));             \
-  if [ -n "$$MATCHES" ]; then                                            \
-    echo "Warning, one or libraries matching Rust library '$(1)'" &&     \
-    echo "  (other than '$$LIB_NAME' itself) already present"     &&     \
-    echo "  at destination $(LIB_DESTIN_DIR):"                    &&     \
-    echo $$MATCHES ;                                                     \
+  $(Q)LIB_NAME="$(notdir $(lastword $(wildcard $(LIB_SOURCE_DIR)/$(1))))"; \
+  MATCHES="$(filter-out %$(notdir $(lastword $(wildcard $(LIB_SOURCE_DIR)/$(1)))),\
+                        $(wildcard $(LIB_DESTIN_DIR)/$(1)))";              \
+  if [ -n "$$MATCHES" ]; then                                              \
+    echo "Warning, one or libraries matching Rust library '$(1)'" &&       \
+    echo "  (other than '$$LIB_NAME' itself) already present"     &&       \
+    echo "  at destination $(LIB_DESTIN_DIR):"                    &&       \
+    echo $$MATCHES ;                                                       \
   fi
   $(call DO_INSTALL_LIB,$(1))
 endef