X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FPackages.lhs;h=8a4009d89a1ea032911a50cab57f709f8e7c8284;hb=153b9cb9b11e05c4edb1b6bc0a7b972660e41f70;hp=93a885688244f486666d75decb6af2c5adce4a93;hpb=ac80e0dececb68ed6385e3b34765fd8f9c019767;p=ghc-hetmet.git diff --git a/ghc/compiler/main/Packages.lhs b/ghc/compiler/main/Packages.lhs index 93a8856..8a4009d 100644 --- a/ghc/compiler/main/Packages.lhs +++ b/ghc/compiler/main/Packages.lhs @@ -34,9 +34,6 @@ module Packages ( ) where -#include "../includes/ghcconfig.h" --- Needed for mingw32_TARGET_OS defn - #include "HsVersions.h" import PackageConfig @@ -44,7 +41,7 @@ import DriverState ( v_Build_tag, v_RTS_Build_tag, v_Static ) import SysTools ( getTopDir, getPackageConfigPath ) import ParsePkgConf ( loadPackageConfig ) import CmdLineOpts ( DynFlags(..), PackageFlag(..), opt_Static ) -import Config ( cTARGETARCH, cTARGETOS, cProjectVersion ) +import Config ( cProjectVersion ) import Name ( Name, nameModule_maybe ) import Module ( Module, mkModule ) import UniqFM @@ -206,7 +203,7 @@ readPackageConfigs dflags = do -- (GHC >= 6.3). appdir <- getAppUserDataDirectory "ghc" let - pkgconf = appdir ++ '/':cTARGETARCH ++ '-':cTARGETOS + pkgconf = appdir ++ '/':TARGET_ARCH ++ '-':TARGET_OS ++ '-':cProjectVersion ++ "/package.conf" -- exists <- doesFileExist pkgconf @@ -234,8 +231,8 @@ readPackageConfig dflags pkg_map conf_file = do mungePackagePaths :: String -> [PackageConfig] -> [PackageConfig] --- Replace the string "$libdir" at the beginning of a path --- with the current libdir (obtained from the -B option). +-- Replace the string "$topdir" at the beginning of a path +-- with the current topdir (obtained from the -B option). mungePackagePaths top_dir ps = map munge_pkg ps where munge_pkg p = p{ importDirs = munge_paths (importDirs p), @@ -246,7 +243,7 @@ mungePackagePaths top_dir ps = map munge_pkg ps munge_paths = map munge_path munge_path p - | Just p' <- maybePrefixMatch "$libdir" p = top_dir ++ p' + | Just p' <- maybePrefixMatch "$topdir" p = top_dir ++ p' | otherwise = p