summaryrefslogtreecommitdiff
path: root/rules/bindist.mk
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-08-26 12:29:53 +0000
committerIan Lynagh <igloo@earth.li>2009-08-26 12:29:53 +0000
commite8842f6d21227fe800a495197be0d9f34aa862cc (patch)
tree34048ea795cf1b669cfdce797d581f6d2e02778d /rules/bindist.mk
parentb56947b36b22699a3912864c28b26c21a1c0c366 (diff)
downloadhaskell-e8842f6d21227fe800a495197be0d9f34aa862cc.tar.gz
Fix bindist creation
We were running into problems like: for f in LICENSE configure config.sub config.guess [...] make[2]: execvp: /bin/sh: Argument list too long This patch moves the loop into make, rather than the shell.
Diffstat (limited to 'rules/bindist.mk')
-rw-r--r--rules/bindist.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/rules/bindist.mk b/rules/bindist.mk
index 476202316d..56192a595d 100644
--- a/rules/bindist.mk
+++ b/rules/bindist.mk
@@ -23,6 +23,14 @@ define bindist
bindist: bindist_$1
bindist_$1:
- for f in $2; do echo $(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