1 # -----------------------------------------------------------------------------
3 # (c) 2010 The University of Glasgow
5 # This file is part of the GHC build system.
7 # To understand how the build system works and how to modify it, see
8 # http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
9 # http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
11 # -----------------------------------------------------------------------------
14 $$(foreach p,$$(patsubst libraries/%,%,$$(wildcard $$(shell grep '^[^ ]\+ \+\(dph\|extra\) \+[^ ]\+ \+[^ ]\+ \+[^ ]\+' packages | sed 's/ .*//'))),\
15 $$(eval BUILD_DIRS += libraries/$$p)\
16 $$(if $$(wildcard libraries/$$p/ghc-packages),\
17 $$(foreach q,$$(shell cat libraries/$$p/ghc-packages2),$$(eval $$(call extra-package,$$p,$$p/$$q))),\
18 $$(eval $$(call extra-package,$$p,$$p)))\
22 define extra-package # $1 = package root, $2 = package
23 ifeq "$(wildcard libraries/$1/ghc-stage2-package)" ""
24 $$(eval $$(call addPackage,$2))
26 $$(eval $$(call addPackage2,$2))