Fix desugaring of pattern bindings (again)
[ghc.git] / rules / bindist.mk
1 # -----------------------------------------------------------------------------
2 #
3 # (c) 2009 The University of Glasgow
4 #
5 # This file is part of the GHC build system.
6 #
7 # To understand how the build system works and how to modify it, see
8 # http://ghc.haskell.org/trac/ghc/wiki/Building/Architecture
9 # http://ghc.haskell.org/trac/ghc/wiki/Building/Modifying
10 #
11 # -----------------------------------------------------------------------------
12
13
14 # Add files to the bindist-list. Invoke like this:
15 #
16 # $(eval $(call bindist-list,utils/genapply,ghc.mk))
17
18 define bindist-list
19 # $1 = name
20 # $2 = files
21
22 .PHONY: bindist-list_$1
23 bindist-list: bindist-list_$1
24
25 bindist-list_$1:
26 $(foreach i,$2,\
27 $(call make-command,\
28 for f in $i; do echo $(BIN_DIST_NAME)/$$$$f >> bindist-list; done \
29 ) \
30 )
31 endef
32