Commit 4a594280 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Undo a simplification in the type of absoluteInstallDirs

Existing Setup scripts use it so we can't change it. Fixes #563.
parent acb4d219
......@@ -128,7 +128,7 @@ generate pkg_descr lbi =
libdir = flat_libdir,
datadir = flat_datadir,
libexecdir = flat_libexecdir
} = absoluteInstallDirs (packageId pkg_descr) lbi NoCopyDest
} = absoluteInstallDirs pkg_descr lbi NoCopyDest
InstallDirs {
bindir = flat_bindirrel,
libdir = flat_libdirrel,
......
......@@ -476,7 +476,7 @@ configure (pkg_descr0, pbi) cfg
progSuffix = fromFlag $ configProgSuffix cfg
}
let dirs = absoluteInstallDirs (packageId pkg_descr) lbi NoCopyDest
let dirs = absoluteInstallDirs pkg_descr lbi NoCopyDest
relative = prefixRelativeInstallDirs (packageId pkg_descr) lbi
unless (isAbsolute (prefix dirs)) $ die $
......
......@@ -96,7 +96,7 @@ install pkg_descr lbi flags = do
htmldir = htmlPref,
haddockdir = interfacePref,
includedir = incPref})
= absoluteInstallDirs (packageId pkg_descr) lbi copydest
= absoluteInstallDirs pkg_descr lbi copydest
--TODO: decide if we need the user to be able to control the libdir
-- for shared libs independently of the one for static libs. If so
......@@ -159,7 +159,7 @@ install pkg_descr lbi flags = do
JHC -> do withLib pkg_descr $ JHC.installLib verbosity libPref buildPref pkg_descr
withExe pkg_descr $ JHC.installExe verbosity binPref buildPref (progPrefixPref, progSuffixPref) pkg_descr
Hugs -> do
let targetProgPref = progdir (absoluteInstallDirs (packageId pkg_descr) lbi NoCopyDest)
let targetProgPref = progdir (absoluteInstallDirs pkg_descr lbi NoCopyDest)
let scratchPref = scratchDir lbi
Hugs.install verbosity libPref progPref binPref targetProgPref scratchPref (progPrefixPref, progSuffixPref) pkg_descr
NHC -> do withLib pkg_descr $ NHC.installLib verbosity libPref buildPref (packageId pkg_descr)
......
......@@ -162,11 +162,11 @@ isInternalPackage pkg_descr pkgid = packageId pkg_descr == pkgid
-- Wrappers for a couple functions from InstallDirs
-- |See 'InstallDirs.absoluteInstallDirs'
absoluteInstallDirs :: PackageId -> LocalBuildInfo -> CopyDest
absoluteInstallDirs :: PackageDescription -> LocalBuildInfo -> CopyDest
-> InstallDirs FilePath
absoluteInstallDirs pkgid lbi copydest =
absoluteInstallDirs pkg lbi copydest =
InstallDirs.absoluteInstallDirs
pkgid
(packageId pkg)
(compilerId (compiler lbi))
copydest
(installDirTemplates lbi)
......
......@@ -225,7 +225,7 @@ registerPackageHugs verbosity pkg lib lbi clbi distPref inplace _packageDb = do
when inplace $ die "--inplace is not supported with Hugs"
installedPkgInfo <- generateRegistrationInfo
pkg lib lbi clbi inplace distPref
let installDirs = absoluteInstallDirs (packageId pkg) lbi NoCopyDest
let installDirs = absoluteInstallDirs pkg lbi NoCopyDest
createDirectoryIfMissingVerbose verbosity True (libdir installDirs)
writeFileAtomic (libdir installDirs </> "package.conf")
(showInstalledPackageInfo installedPkgInfo ++ "\n")
......@@ -333,7 +333,7 @@ inplaceInstalledPackageInfo inplaceDir distPref pkg lib lbi clbi =
where
adjustReativeIncludeDirs = map (inplaceDir </>)
installDirs =
(absoluteInstallDirs (packageId pkg) lbi NoCopyDest) {
(absoluteInstallDirs pkg lbi NoCopyDest) {
libdir = inplaceDir </> buildDir lbi,
datadir = inplaceDir,
datasubdir = distPref,
......@@ -364,7 +364,7 @@ absoluteInstalledPackageInfo pkg lib lbi clbi =
| null (installIncludes bi) = []
| otherwise = [includedir installDirs]
bi = libBuildInfo lib
installDirs = absoluteInstallDirs (packageId pkg) lbi NoCopyDest
installDirs = absoluteInstallDirs pkg lbi NoCopyDest
-- -----------------------------------------------------------------------------
......@@ -377,7 +377,7 @@ unregister pkg lbi regFlags = do
verbosity = fromFlag (regVerbosity regFlags)
packageDb = fromFlagOrDefault (registrationPackageDB (withPackageDB lbi))
(regPackageDB regFlags)
installDirs = absoluteInstallDirs pkgid lbi NoCopyDest
installDirs = absoluteInstallDirs pkg lbi NoCopyDest
setupMessage verbosity "Unregistering" pkgid
case compilerFlavor (compiler lbi) of
GHC ->
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment