micro-opt: replace stmGetEnclosingTRec() with a field access
[ghc-hetmet.git] / rules / bindist.mk
index 4762023..f2bfd8f 100644 (file)
@@ -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 $1; do echo $(BIN_DIST_NAME)/$$$$f >> $(BIN_DIST_LIST); done
 endef