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