Skip to content

Commit 6841c77

Browse files
committed
Update cp to install, so we can safely install on systems with restrictive umasks
1 parent 53dbde6 commit 6841c77

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mk/install.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
# Installation macro. Call with source directory as arg 1,
66
# destination directory as arg 2, and filename/libname-glob as arg 3
77
ifdef VERBOSE
8-
INSTALL = cp $(1)/$(3) $(2)/$(3)
9-
INSTALL_LIB = cp `ls -rt1 $(1)/$(3) | tail -1` $(2)/
8+
INSTALL = install -m755 -T $(1)/$(3) $(2)/$(3)
9+
INSTALL_LIB = install -m644 `ls -rt1 $(1)/$(3) | tail -1` $(2)/
1010
else
11-
INSTALL = $(Q)$(call E, install: $(2)/$(3)) && cp $(1)/$(3) $(2)/$(3)
11+
INSTALL = $(Q)$(call E, install: $(2)/$(3)) && install -m755 -T $(1)/$(3) $(2)/$(3)
1212
INSTALL_LIB = $(Q)$(call E, install_lib: $(2)/$(3)) && \
13-
cp `ls -rt1 $(1)/$(3) | tail -1` $(2)/
13+
install -m644 `ls -rt1 $(1)/$(3) | tail -1` $(2)/
1414
endif
1515

1616
# The stage we install from

0 commit comments

Comments
 (0)