summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-11-16 19:38:54 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-11-16 19:38:54 -0500
commitea67ea421b8bd1f0d87c7bf5c49ed14d8f9056e9 (patch)
treef94938f1e792f1b03a9caf107b6c356bf180834e
parente26069d3c28bec94bbb7c425276cf054d7408ea1 (diff)
Makefile: preserving timestamps when copying directories is a bad idea
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index dd2140a..b8fdcd8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
top := $(shell pwd)
CAT = cat
-CP = cp
+CPR = cp -dR --preserve=mode,ownership
ECHO = echo
EXISTS = test -e
FAIL = exit 1
@@ -116,7 +116,7 @@ build/extract/git/%: # magic foreach loop
build/extract/svn/%: build/download/svn/%
$(RM) -r '$@'
$(MKDIRS) '$(@D)'
- $(CP) -a '$<' '$@' || { $(RM) -r '$@'; $(FAIL); }
+ $(CPR) '$<' '$@' || { $(RM) -r '$@'; $(FAIL); }
$(TOUCH) '$@'
# tar
@@ -131,7 +131,7 @@ build/extract/tar/%: # magic foreach loop
# union
build/extract/union/%: # magic foreach loop
$(RM) -r '$@'
- $(MKDIRS) '$@' && $(CP) -a $(foreach d,$(filter build/extract/%,$^),'$d'/*) '$@/' || { $(RM) -r '$@'; $(FAIL); }
+ $(MKDIRS) '$@' && $(CPR) $(foreach d,$(filter build/extract/%,$^),'$d'/*) '$@/' || { $(RM) -r '$@'; $(FAIL); }
$(TOUCH) '$@'
# magic foreach loop (git, tar)
@@ -158,7 +158,7 @@ $(addprefix build/workdir/,$(packages)): \
build/workdir/%:
$(RM) -r '$@'
$(MKDIRS) '$(@D)'
- $(CP) -a '$<' '$@' || { $(RM) -r '$@'; $(FAIL); }
+ $(CPR) '$<' '$@' || { $(RM) -r '$@'; $(FAIL); }
cd '$@' && \
for patch in $(sort $(wildcard $(top)/rules/$*/*.patch)); do \
$(PATCH) -p1 < $$patch || { $(RM) -r '$@'; $(FAIL); }; \