diff options
-rw-r--r-- | Makefile | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -1,7 +1,8 @@ top := $(shell pwd) CAT = cat -CPR = cp -dR --preserve=mode,ownership +CP = cp -d --preserve=mode,ownership +CPR = $(CP) -R ECHO = echo EXISTS = test -e FAIL = exit 1 @@ -107,6 +108,10 @@ build/download/tar/%: .tokens/network $(MKDIRS) '$(@D)' $(WGET) -c -O '$@' '$(call file2,url,tar/$*)' $(TOUCH) '$@' +build/download/file/%: .tokens/network + $(MKDIRS) '$(@D)' + $(WGET) -c -O '$@' '$(call file2,url,file/$*)' + $(TOUCH) '$@' # extract ###################################################################### @@ -148,6 +153,12 @@ build/extract/tar/%: # magic foreach loop ( cd '$(_tar_basedir)' && $(TAR) -m $(if $(filter $(_tar_basedir),$(tarbombs)),,--strip-components 1) -xf '$(top)/$<' ); \ } || { $(RM) -r '$(_tar_basedir)'; $(FAIL); } +build/extract/file/%: build/download/file/% + $(RM) -r '$@' + $(MKDIRS) '$@' + $(CP) -T '$<' '$@/$(notdir $(call file2,url,file/$*))' || { $(RM) -r '$@'; $(FAIL); } + $(TOUCH) '$@' + # union build/extract/union/%: # magic foreach loop $(RM) -r '$@' |