X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rules%2Fbindist.mk;h=56192a595d9c22a84eb5fc287c314cbbf5adf3ed;hb=93cd31711eea3dc9aa2ef8995e8ba054dabd87f0;hp=d1b0403806f983e02b89e5c74b605f2e343f8120;hpb=8022ffa5981a27c53cb907a8bfc84032d2c13342;p=ghc-hetmet.git diff --git a/rules/bindist.mk b/rules/bindist.mk index d1b0403..56192a5 100644 --- a/rules/bindist.mk +++ b/rules/bindist.mk @@ -16,13 +16,21 @@ # $(eval $(call bindist,utils/genapply,ghc.mk)) define bindist -# $1 = dir +# $1 = name # $2 = files .PHONY: bindist_$1 bindist: bindist_$1 bindist_$1: - for f in $2; do echo $1/$(BIN_DIST_NAME)/$$$$f >> $(BIN_DIST_LIST); done +$(foreach i,$2,$(call bindist_item,$i)) +endef + +define bindist_item + +# $1 = the line +# The formatting of this definition (e.g. the blank line above) is +# important, in order to get make to generate the right makefile code. + for f in $(BIN_DIST_NAME)/$1; do echo $$$$f >> $(BIN_DIST_LIST); done endef