about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAleksander Balicki <balicki.aleksander@gmail.com>2012-01-28 02:52:44 +0100
committerAleksander Balicki <balicki.aleksander@gmail.com>2012-01-28 02:52:44 +0100
commit6841c777f6ccc0cb78f6889fc4224167aab43232 (patch)
tree30bd63d6f015f4baa070352e3eb38f8749aa8f85
parent53dbde6cc2aabbf44bf75aea1eecad5729396081 (diff)
downloadrust-6841c777f6ccc0cb78f6889fc4224167aab43232.tar.gz
rust-6841c777f6ccc0cb78f6889fc4224167aab43232.zip
Update cp to install, so we can safely install on systems with restrictive umasks
-rw-r--r--mk/install.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/mk/install.mk b/mk/install.mk
index 244f4c05a59..9a5ad5a6c9f 100644
--- a/mk/install.mk
+++ b/mk/install.mk
@@ -5,12 +5,12 @@
 # Installation macro. Call with source directory as arg 1,
 # destination directory as arg 2, and filename/libname-glob as arg 3
 ifdef VERBOSE
- INSTALL = cp $(1)/$(3) $(2)/$(3)
- INSTALL_LIB = cp `ls -rt1 $(1)/$(3) | tail -1` $(2)/
+ INSTALL = install -m755 -T $(1)/$(3) $(2)/$(3)
+ INSTALL_LIB = install -m644 `ls -rt1 $(1)/$(3) | tail -1` $(2)/
 else
- INSTALL = $(Q)$(call E, install: $(2)/$(3)) && cp $(1)/$(3) $(2)/$(3)
+ INSTALL = $(Q)$(call E, install: $(2)/$(3)) && install -m755 -T $(1)/$(3) $(2)/$(3)
  INSTALL_LIB = $(Q)$(call E, install_lib: $(2)/$(3)) &&                    \
-	       cp `ls -rt1 $(1)/$(3) | tail -1` $(2)/
+	       install -m644 `ls -rt1 $(1)/$(3) | tail -1` $(2)/
 endif
 
 # The stage we install from