Copyright | Isaac Jones 2003-2004 |
---|---|
License | BSD3 |
Maintainer | [email protected] |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
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
- flagAssignment :: FlagAssignment
- extraConfigArgs :: [String]
- installDirTemplates :: InstallDirTemplates
- compiler :: Compiler
- hostPlatform :: Platform
- buildDir :: FilePath
- componentsConfigs :: [(ComponentName, ComponentLocalBuildInfo, [ComponentName])]
- installedPkgs :: InstalledPackageIndex
- pkgDescrFile :: Maybe FilePath
- localPkgDescr :: PackageDescription
- withPrograms :: ProgramConfiguration
- withPackageDB :: PackageDBStack
- withVanillaLib :: Bool
- withProfLib :: Bool
- withSharedLib :: Bool
- withDynExe :: Bool
- withProfExe :: Bool
- withProfLibDetail :: ProfDetailLevel
- withProfExeDetail :: ProfDetailLevel
- withOptimization :: OptimisationLevel
- withDebugInfo :: DebugInfoLevel
- withGHCiLib :: Bool
- splitObjs :: Bool
- stripExes :: Bool
- stripLibs :: Bool
- progPrefix :: PathTemplate
- progSuffix :: PathTemplate
- relocatable :: Bool
- externalPackageDeps :: LocalBuildInfo -> [(UnitId, PackageId)]
- localComponentId :: LocalBuildInfo -> ComponentId
- localUnitId :: LocalBuildInfo -> UnitId
- localCompatPackageKey :: LocalBuildInfo -> String
- data Component
- data ComponentName
- showComponentName :: ComponentName -> String
- data ComponentLocalBuildInfo
- foldComponent :: (Library -> a) -> (Executable -> a) -> (TestSuite -> a) -> (Benchmark -> a) -> Component -> a
- componentName :: Component -> ComponentName
- componentBuildInfo :: Component -> BuildInfo
- componentEnabled :: Component -> Bool
- componentDisabledReason :: Component -> Maybe ComponentDisabledReason
- data ComponentDisabledReason
- pkgComponents :: PackageDescription -> [Component]
- pkgEnabledComponents :: PackageDescription -> [Component]
- lookupComponent :: PackageDescription -> ComponentName -> Maybe Component
- getComponent :: PackageDescription -> ComponentName -> Component
- getComponentLocalBuildInfo :: LocalBuildInfo -> ComponentName -> ComponentLocalBuildInfo
- allComponentsInBuildOrder :: LocalBuildInfo -> [(ComponentName, ComponentLocalBuildInfo)]
- componentsInBuildOrder :: LocalBuildInfo -> [ComponentName] -> [(ComponentName, ComponentLocalBuildInfo)]
- checkComponentsCyclic :: Ord key => [(node, key, [key])] -> Maybe [(node, key, [key])]
- depLibraryPaths :: Bool -> Bool -> LocalBuildInfo -> ComponentLocalBuildInfo -> IO [FilePath]
- withAllComponentsInBuildOrder :: PackageDescription -> LocalBuildInfo -> (Component -> ComponentLocalBuildInfo -> IO ()) -> IO ()
- withComponentsInBuildOrder :: PackageDescription -> LocalBuildInfo -> [ComponentName] -> (Component -> ComponentLocalBuildInfo -> IO ()) -> IO ()
- withComponentsLBI :: PackageDescription -> LocalBuildInfo -> (Component -> ComponentLocalBuildInfo -> IO ()) -> IO ()
- withLibLBI :: PackageDescription -> LocalBuildInfo -> (Library -> ComponentLocalBuildInfo -> IO ()) -> IO ()
- withExeLBI :: PackageDescription -> LocalBuildInfo -> (Executable -> ComponentLocalBuildInfo -> IO ()) -> IO ()
- withTestLBI :: PackageDescription -> LocalBuildInfo -> (TestSuite -> ComponentLocalBuildInfo -> IO ()) -> IO ()
- 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 -> [(UnitId, PackageId)] Source #
External package dependencies for the package as a whole. This is the
union of the individual componentPackageDeps
, less any internal deps.
localComponentId :: LocalBuildInfo -> ComponentId Source #
Extract the ComponentId
from the library component of a
LocalBuildInfo
if it exists, or make a fake component ID based
on the package ID.
localUnitId :: LocalBuildInfo -> UnitId Source #
Extract the UnitId
from the library component of a
LocalBuildInfo
if it exists, or make a fake unit ID based on
the package ID.
localCompatPackageKey :: LocalBuildInfo -> String Source #
Extract the compatibility ComponentId
from the library component of a
LocalBuildInfo
if it exists, or make a fake compatibility package
key based on the package ID.
Buildable package components
data ComponentName Source #
data ComponentLocalBuildInfo Source #
LibComponentLocalBuildInfo | |
| |
ExeComponentLocalBuildInfo | |
| |
TestComponentLocalBuildInfo | |
| |
BenchComponentLocalBuildInfo | |
|
foldComponent :: (Library -> a) -> (Executable -> a) -> (TestSuite -> a) -> (Benchmark -> a) -> Component -> a Source #
componentEnabled :: Component -> Bool Source #
pkgComponents :: PackageDescription -> [Component] Source #
All the components in the package (libs, exes, or test suites).
pkgEnabledComponents :: PackageDescription -> [Component] Source #
All the components in the package that are buildable and enabled. Thus this excludes non-buildable components and test suites or benchmarks that have been disabled.
componentsInBuildOrder :: LocalBuildInfo -> [ComponentName] -> [(ComponentName, ComponentLocalBuildInfo)] Source #
checkComponentsCyclic :: Ord key => [(node, key, [key])] -> Maybe [(node, key, [key])] Source #
:: Bool | Building for inplace? |
-> Bool | Generate prefix-relative library paths |
-> LocalBuildInfo | |
-> ComponentLocalBuildInfo | Component that is being built |
-> IO [FilePath] |
Determine the directories containing the dynamic libraries of the transitive dependencies of the component we are building.
When wanted, and possible, returns paths relative to the installDirs prefix
withAllComponentsInBuildOrder :: PackageDescription -> 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
withComponentsInBuildOrder :: PackageDescription -> LocalBuildInfo -> [ComponentName] -> (Component -> ComponentLocalBuildInfo -> IO ()) -> IO () Source #
withComponentsLBI :: PackageDescription -> LocalBuildInfo -> (Component -> ComponentLocalBuildInfo -> IO ()) -> IO () Source #
Deprecated: Use withAllComponentsInBuildOrder
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.
withTestLBI :: PackageDescription -> LocalBuildInfo -> (TestSuite -> ComponentLocalBuildInfo -> IO ()) -> IO () Source #
Installation directories
absoluteInstallDirs :: PackageDescription -> LocalBuildInfo -> CopyDest -> InstallDirs FilePath Source #
substPathTemplate :: PackageId -> LocalBuildInfo -> PathTemplate -> FilePath Source #