Skip to content

Commit 1c935f1

Browse files
committed
docs.mk: use posix arguments for cp
`cp -a` is a GNU extension. Use an alternate combinaison of POSIX options (`-PRp`) that do nearly the same. The difference is `-a` will preserve context, links and xattr attributes, whereas `-p` not. But as we use it only for copy a file, there is no difference in the current context.
1 parent 95b228a commit 1c935f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mk/docs.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,21 +129,21 @@ doc/:
129129
HTML_DEPS += doc/rust.css
130130
doc/rust.css: $(D)/rust.css | doc/
131131
@$(call E, cp: $@)
132-
$(Q)cp -a $< $@ 2> /dev/null
132+
$(Q)cp -PRp $< $@ 2> /dev/null
133133

134134
HTML_DEPS += doc/favicon.inc
135135
doc/favicon.inc: $(D)/favicon.inc | doc/
136136
@$(call E, cp: $@)
137-
$(Q)cp -a $< $@ 2> /dev/null
137+
$(Q)cp -PRp $< $@ 2> /dev/null
138138

139139
doc/full-toc.inc: $(D)/full-toc.inc | doc/
140140
@$(call E, cp: $@)
141-
$(Q)cp -a $< $@ 2> /dev/null
141+
$(Q)cp -PRp $< $@ 2> /dev/null
142142

143143
HTML_DEPS += doc/footer.inc
144144
doc/footer.inc: $(D)/footer.inc | doc/
145145
@$(call E, cp: $@)
146-
$(Q)cp -a $< $@ 2> /dev/null
146+
$(Q)cp -PRp $< $@ 2> /dev/null
147147

148148
# The (english) documentation for each doc item.
149149

0 commit comments

Comments
 (0)