From 0d704c52842acc805793bb31d8a3aaeccf72d349 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 25 Jul 2014 16:54:41 -0400 Subject: Makefile: cut out the middle man (package) in the magic foreach loop --- Makefile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index fa542ab..9927740 100644 --- a/Makefile +++ b/Makefile @@ -118,14 +118,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); } -# magic foreach loop -$(foreach package,$(packages), \ - $(if $(call specs_for,git tar,$($(package))), \ - $(eval \ - build/extract/$(call name2,file,$(package)): \ - build/download/$(call name2,base,$(package)) \ - ) \ - ) \ +# magic foreach loop (git, tar) +$(foreach spec,$(call specs_for,git tar), \ + $(eval \ + build/extract/$(call spec2,file,$(spec)): \ + build/download/$(call spec2,base,$(spec)) \ + ) \ ) # place (patch) ################################################################ -- cgit v1.2.3