Update cp to install, so we can safely install on systems with restrictive umasks

This commit is contained in:
Aleksander Balicki 2012-01-28 02:52:44 +01:00
parent 53dbde6cc2
commit 6841c777f6

View File

@ -5,12 +5,12 @@
# Installation macro. Call with source directory as arg 1, # Installation macro. Call with source directory as arg 1,
# destination directory as arg 2, and filename/libname-glob as arg 3 # destination directory as arg 2, and filename/libname-glob as arg 3
ifdef VERBOSE ifdef VERBOSE
INSTALL = cp $(1)/$(3) $(2)/$(3) INSTALL = install -m755 -T $(1)/$(3) $(2)/$(3)
INSTALL_LIB = cp `ls -rt1 $(1)/$(3) | tail -1` $(2)/ INSTALL_LIB = install -m644 `ls -rt1 $(1)/$(3) | tail -1` $(2)/
else 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)) && \ 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 endif
# The stage we install from # The stage we install from