Commit 73b98445 authored by Simon Marlow's avatar Simon Marlow

make sure libraries/dph/ghc.mk is included after the other DPH ghc.mk

files, so that it can refer to variables defined there.  (necessary,
but perhaps not sufficient, to fix the DPH build bugs)
parent aed43f7a
...@@ -616,7 +616,10 @@ endif ...@@ -616,7 +616,10 @@ endif
# ---------------------------------------------- # ----------------------------------------------
# Actually include all the sub-ghc.mk's # Actually include all the sub-ghc.mk's
include $(patsubst %, %/ghc.mk, $(BUILD_DIRS)) # BUILD_DIRS_EXTRA needs to come after BUILD_DIRS, because stuff in
# libraries/dph/ghc.mk refers to stuff defined earlier, in particular
# things like $(libraries/dph/dph-base_dist-install_GHCI_LIB)
include $(patsubst %, %/ghc.mk, $(BUILD_DIRS) $(BUILD_DIRS_EXTRA))
# A useful pseudo-target (must be after the include above, because it needs # A useful pseudo-target (must be after the include above, because it needs
# the value of things like $(libraries/base_dist-install_v_LIB). # the value of things like $(libraries/base_dist-install_v_LIB).
......
...@@ -27,9 +27,13 @@ ...@@ -27,9 +27,13 @@
# add P to the list of packages # add P to the list of packages
define extra-packages define extra-packages
# Collects some dirs containing ghc.mk files that we need to include:
BUILD_DIRS_EXTRA=
$$(foreach p,$$(patsubst libraries/%,%,$$(wildcard $$(shell grep '^[^ #][^ ]* \+\(dph\|extra\) \+[^ ]\+ \+[^ ]\+$$$$' packages | sed 's/ .*//'))),\ $$(foreach p,$$(patsubst libraries/%,%,$$(wildcard $$(shell grep '^[^ #][^ ]* \+\(dph\|extra\) \+[^ ]\+ \+[^ ]\+$$$$' packages | sed 's/ .*//'))),\
$$(if $$(wildcard libraries/$$p/ghc-packages),\ $$(if $$(wildcard libraries/$$p/ghc-packages),\
$$(eval BUILD_DIRS += libraries/$$p) \ $$(eval BUILD_DIRS_EXTRA += libraries/$$p) \
$$(foreach q,$$(shell cat libraries/$$p/ghc-packages2),$$(eval $$(call extra-package,$$p,$$p/$$q))),\ $$(foreach q,$$(shell cat libraries/$$p/ghc-packages2),$$(eval $$(call extra-package,$$p,$$p/$$q))),\
$$(eval $$(call extra-package,$$p,$$p)))\ $$(eval $$(call extra-package,$$p,$$p)))\
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment