summaryrefslogtreecommitdiff
path: root/compiler/Makefile
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-11-15 10:32:49 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-11-15 10:32:49 +0000
commitf4629357f3eb3714955fc3f8ac81440123e7caf4 (patch)
treeb509e9111737aa5ac8d0e9d5e18eeb90477ee029 /compiler/Makefile
parent0de09797ca0ee56c9f37ea458133efd916ab4b02 (diff)
downloadhaskell-f4629357f3eb3714955fc3f8ac81440123e7caf4.tar.gz
Avoid the use of unversioned package dependencies
Fortunately "ghc-pkg list $pkg --simple-output" is a good way to add the version number.
Diffstat (limited to 'compiler/Makefile')
-rw-r--r--compiler/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/Makefile b/compiler/Makefile
index 568812acd4..fa6d4a557b 100644
--- a/compiler/Makefile
+++ b/compiler/Makefile
@@ -843,7 +843,9 @@ PACKAGE = ghc
HIERARCHICAL_LIB = NO
VERSION = $(ProjectVersion)
PKG_DEPENDS += base haskell98
-PACKAGE_CPP_OPTS += -DPKG_DEPENDS='$(PKG_DEPENDS)'
+# We have to expand each package dependency with its version, which we
+# can do by calling "ghc-pkg list $pkg --simple-output".
+PACKAGE_CPP_OPTS += -DPKG_DEPENDS='$(foreach pkg,$(PKG_DEPENDS),$(shell $(GHC_PKG_INPLACE) list $(pkg) --simple-output))'
PACKAGE_CPP_OPTS += -DSTAGE='"$(stage)"'
# Omit Main from the library, the client will want to plug their own Main in