)
where
-#include "../includes/ghcconfig.h"
--- Needed for mingw32_TARGET_OS defn
-
#include "HsVersions.h"
import PackageConfig
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
-- (GHC >= 6.3).
appdir <- getAppUserDataDirectory "ghc"
let
- pkgconf = appdir ++ '/':cTARGETARCH ++ '-':cTARGETOS
+ pkgconf = appdir ++ '/':TARGET_ARCH ++ '-':TARGET_OS
++ '-':cProjectVersion ++ "/package.conf"
--
exists <- doesFileExist pkgconf
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),
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