From ea67ea421b8bd1f0d87c7bf5c49ed14d8f9056e9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 16 Nov 2014 19:38:54 -0500 Subject: Makefile: preserving timestamps when copying directories is a bad idea --- Makefile | 8 ++++---- 1 file 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); }; \ -- cgit v1.2.3