use "ghc-pkg latest --global" instead of "ghc-pkg list --simple-output"
authorSimon Marlow <simonmar@microsoft.com>
Fri, 16 Nov 2007 12:20:18 +0000 (12:20 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Fri, 16 Nov 2007 12:20:18 +0000 (12:20 +0000)
The former now does the right thing: it uses the global database only,
and picks the most recent package with the given name.

compiler/Makefile

index fa6d4a5..793cf6b 100644 (file)
@@ -845,7 +845,7 @@ VERSION = $(ProjectVersion)
 PKG_DEPENDS += base haskell98
 # 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 += -DPKG_DEPENDS='$(foreach pkg,$(PKG_DEPENDS),$(shell $(GHC_PKG_INPLACE) latest --global $(pkg)))'
 PACKAGE_CPP_OPTS += -DSTAGE='"$(stage)"'
 
 # Omit Main from the library, the client will want to plug their own Main in