Add gen-dll as replacement for dll-split
[ghc.git] / rules / bindist.mk
index f2bfd8f..49d8aa4 100644 (file)
@@ -5,32 +5,28 @@
 # This file is part of the GHC build system.
 #
 # To understand how the build system works and how to modify it, see
-#      http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
-#      http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#      http://ghc.haskell.org/trac/ghc/wiki/Building/Architecture
+#      http://ghc.haskell.org/trac/ghc/wiki/Building/Modifying
 #
 # -----------------------------------------------------------------------------
 
 
-# Add files to the bindist. Invoke like this:
+# Add files to the bindist-list. Invoke like this:
 #
-# $(eval $(call bindist,utils/genapply,ghc.mk))
+# $(eval $(call bindist-list,utils/genapply,ghc.mk))
 
-define bindist
+define bindist-list
 # $1 = name
 # $2 = files
 
-.PHONY: bindist_$1
-bindist: bindist_$1
+.PHONY: bindist-list_$1
+bindist-list: bindist-list_$1
 
-bindist_$1:
-$(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
+bindist-list_$1:
+       $(foreach i,$2,\
+           $(call make-command,\
+               for f in $i; do echo $(BIN_DIST_NAME)/$$$$f >> bindist-list; done \
+           ) \
+           )
 endef