diff options
author | Simon Marlow <marlowsd@gmail.com> | 2010-09-21 10:01:53 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2010-09-21 10:01:53 +0000 |
commit | 6a1dd52566ae92ce133e751d9a800a8631b05b73 (patch) | |
tree | fd771986fad28eedfd5a5b5f4c83544301273c23 /rules | |
parent | 278d7e0f00011314d93426d997404d125095906b (diff) | |
download | haskell-6a1dd52566ae92ce133e751d9a800a8631b05b73.tar.gz |
fix building with extra packages (packages were added to BUILD_DIRS twice)
Also add some comments about what extra-packages is doing
Diffstat (limited to 'rules')
-rw-r--r-- | rules/extra-packages.mk | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/rules/extra-packages.mk b/rules/extra-packages.mk index 2afa82ab3d..c54c60496f 100644 --- a/rules/extra-packages.mk +++ b/rules/extra-packages.mk @@ -10,10 +10,26 @@ # # ----------------------------------------------------------------------------- +# For each package P marked as "dph" or "extra" in $(TOP)/packages: +# if $(TOP)/libraries/P exists, then +# if $(TOP)/libraries/P/ghc-packages exists, then +# * add each package from $(TOP)/libraries/P/ghc-packages2 to the list of +# packages. +# Note: ghc-packages2 might have a different list from +# ghc-packages, this is to support dph which has some +# packages that are automatically derived from a single +# source by the build system). +# * add $(TOP)/libraries/P to $(BUILD_DIRS) +# This step is necessary in the case of dph, which has some +# build system code in libraries/dph/ghc.mk, but +# libraries/dph is not itself a package. +# else +# add P to the list of packages + define extra-packages $$(foreach p,$$(patsubst libraries/%,%,$$(wildcard $$(shell grep '^[^ ]\+ \+\(dph\|extra\) \+[^ ]\+ \+[^ ]\+ \+[^ ]\+' packages | sed 's/ .*//'))),\ - $$(eval BUILD_DIRS += libraries/$$p)\ $$(if $$(wildcard libraries/$$p/ghc-packages),\ + $$(eval BUILD_DIRS += libraries/$$p) \ $$(foreach q,$$(shell cat libraries/$$p/ghc-packages2),$$(eval $$(call extra-package,$$p,$$p/$$q))),\ $$(eval $$(call extra-package,$$p,$$p)))\ ) |