Portability | portable |
---|---|
Maintainer | cabal-devel@haskell.org |
Once a package has been configured we have resolved conditionals and
dependencies, configured the compiler and other needed external programs.
The LocalBuildInfo
is used to hold all this information. It holds the
install dirs, the compiler, the exact package dependencies, the configured
programs, the package database to use and a bunch of miscellaneous configure
flags. It gets saved and reloaded from a file (dist/setup-config
). It gets
passed in to very many subsequent build actions.
- data LocalBuildInfo = LocalBuildInfo {
- configFlags :: ConfigFlags
- extraConfigArgs :: [String]
- installDirTemplates :: InstallDirTemplates
- compiler :: Compiler
- buildDir :: FilePath
- scratchDir :: FilePath
- libraryConfig :: Maybe ComponentLocalBuildInfo
- executableConfigs :: [(String, ComponentLocalBuildInfo)]
- compBuildOrder :: [Component]
- testSuiteConfigs :: [(String, ComponentLocalBuildInfo)]
- installedPkgs :: PackageIndex
- pkgDescrFile :: Maybe FilePath
- localPkgDescr :: PackageDescription
- withPrograms :: ProgramConfiguration
- withPackageDB :: PackageDBStack
- withVanillaLib :: Bool
- withProfLib :: Bool
- withSharedLib :: Bool
- withDynExe :: Bool
- withProfExe :: Bool
- withOptimization :: OptimisationLevel
- withGHCiLib :: Bool
- splitObjs :: Bool
- stripExes :: Bool
- progPrefix :: PathTemplate
- progSuffix :: PathTemplate
- externalPackageDeps :: LocalBuildInfo -> [(InstalledPackageId, PackageId)]
- inplacePackageId :: PackageId -> InstalledPackageId
- withLibLBI :: PackageDescription -> LocalBuildInfo -> (Library -> ComponentLocalBuildInfo -> IO ()) -> IO ()
- withExeLBI :: PackageDescription -> LocalBuildInfo -> (Executable -> ComponentLocalBuildInfo -> IO ()) -> IO ()
- withComponentsLBI :: LocalBuildInfo -> (Component -> ComponentLocalBuildInfo -> IO ()) -> IO ()
- withTestLBI :: PackageDescription -> LocalBuildInfo -> (TestSuite -> ComponentLocalBuildInfo -> IO ()) -> IO ()
- data ComponentLocalBuildInfo = ComponentLocalBuildInfo {}
- module Distribution.Simple.InstallDirs
- absoluteInstallDirs :: PackageDescription -> LocalBuildInfo -> CopyDest -> InstallDirs FilePath
- prefixRelativeInstallDirs :: PackageId -> LocalBuildInfo -> InstallDirs (Maybe FilePath)
- substPathTemplate :: PackageId -> LocalBuildInfo -> PathTemplate -> FilePath
Documentation
data LocalBuildInfo Source
Data cached after configuration step. See also
ConfigFlags
.
LocalBuildInfo | |
|
externalPackageDeps :: LocalBuildInfo -> [(InstalledPackageId, PackageId)]Source
External package dependencies for the package as a whole, the union of the
individual targetPackageDeps
.
inplacePackageId :: PackageId -> InstalledPackageIdSource
The installed package Id we use for local packages registered in the local package db. This is what is used for intra-package deps between components.
withLibLBI :: PackageDescription -> LocalBuildInfo -> (Library -> ComponentLocalBuildInfo -> IO ()) -> IO ()Source
If the package description has a library section, call the given
function with the library build info as argument. Extended version of
withLib
that also gives corresponding build info.
withExeLBI :: PackageDescription -> LocalBuildInfo -> (Executable -> ComponentLocalBuildInfo -> IO ()) -> IO ()Source
Perform the action on each buildable Executable
in the package
description. Extended version of withExe
that also gives corresponding
build info.
withComponentsLBI :: LocalBuildInfo -> (Component -> ComponentLocalBuildInfo -> IO ()) -> IO ()Source
Perform the action on each buildable Library
or Executable
(Component)
in the PackageDescription, subject to the build order specified by the
compBuildOrder
field of the given LocalBuildInfo
withTestLBI :: PackageDescription -> LocalBuildInfo -> (TestSuite -> ComponentLocalBuildInfo -> IO ()) -> IO ()Source
data ComponentLocalBuildInfo Source
ComponentLocalBuildInfo | |
|
Installation directories
absoluteInstallDirs :: PackageDescription -> LocalBuildInfo -> CopyDest -> InstallDirs FilePathSource