From f4629357f3eb3714955fc3f8ac81440123e7caf4 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 15 Nov 2007 10:32:49 +0000 Subject: [PATCH] Avoid the use of unversioned package dependencies Fortunately "ghc-pkg list $pkg --simple-output" is a good way to add the version number. --- compiler/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/Makefile b/compiler/Makefile index 568812a..fa6d4a5 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 -- 1.7.10.4