Commit 7d91b773 authored by Luite Stegeman's avatar Luite Stegeman

use CompilerInfo rather than CompilerId for resolving flags and

path templates.

CompilerInfo contains more information about the compiler than
CompilerId, which just stores the flavour and version. In particular,
CompilerInfo knows an AbiTag, which can be used to tell binary
incompatible results from the same compiler apart, and detailed
information about supported languages and extensions.

Some fields in CompilerInfo may be left unknown (Nothing). This can
be used in the future to allow partially resolving configurations
based on supported languages or extensions.
parent 81330d03
......@@ -35,6 +35,11 @@ module Distribution.Compiler (
-- * Compiler id
CompilerId(..),
-- * Compiler info
CompilerInfo(..),
unknownCompilerInfo,
AbiTag(..), abiTagString
) where
import Data.Binary (Binary)
......@@ -44,6 +49,8 @@ import Data.Maybe (fromMaybe)
import Distribution.Version (Version(..))
import GHC.Generics (Generic)
import Language.Haskell.Extension (Language, Extension)
import qualified System.Info (compilerName, compilerVersion)
import Distribution.Text (Text(..), display)
import qualified Distribution.Compat.ReadP as Parse
......@@ -146,3 +153,52 @@ instance Text CompilerId where
lowercase :: String -> String
lowercase = map Char.toLower
-- ------------------------------------------------------------
-- * Compiler Info
-- ------------------------------------------------------------
-- | Compiler information used for resolving configurations. Some fields can be
-- set to Nothing to indicate that the information is unknown.
data CompilerInfo = CompilerInfo {
compilerInfoId :: CompilerId,
-- ^ Compiler flavour and version.
compilerInfoAbiTag :: AbiTag,
-- ^ Tag for distinguishing incompatible ABI's on the same architecture/os.
compilerInfoCompat :: Maybe [CompilerId],
-- ^ Other implementations that this compiler claims to be compatible with, if known.
compilerInfoLanguages :: Maybe [Language],
-- ^ Supported language standards, if known.
compilerInfoExtensions :: Maybe [Extension]
-- ^ Supported extensions, if known.
}
deriving (Generic, Show, Read)
instance Binary CompilerInfo
data AbiTag
= NoAbiTag
| AbiTag String
deriving (Generic, Show, Read)
instance Binary AbiTag
instance Text AbiTag where
disp NoAbiTag = Disp.empty
disp (AbiTag tag) = Disp.text tag
parse = do
tag <- Parse.munch (\c -> Char.isAlphaNum c || c == '_')
if null tag then return NoAbiTag else return (AbiTag tag)
abiTagString :: AbiTag -> String
abiTagString NoAbiTag = ""
abiTagString (AbiTag tag) = tag
-- | Make a CompilerInfo of which only the known information is its CompilerId,
-- its AbiTag and that it does not claim to be compatible with other
-- compiler id's.
unknownCompilerInfo :: CompilerId -> AbiTag -> CompilerInfo
unknownCompilerInfo compilerId abiTag =
CompilerInfo compilerId abiTag (Just []) Nothing Nothing
......@@ -46,7 +46,8 @@ import Distribution.PackageDescription
import Distribution.PackageDescription.Configuration
( flattenPackageDescription, finalizePackageDescription )
import Distribution.Compiler
( CompilerFlavor(..), buildCompilerFlavor, CompilerId(..) )
( CompilerFlavor(..), buildCompilerFlavor, CompilerId(..)
, unknownCompilerInfo, AbiTag(..) )
import Distribution.System
( OS(..), Arch(..), buildPlatform )
import Distribution.License
......@@ -1286,7 +1287,8 @@ checkPackageVersions pkg =
-- using no package index and the current platform.
finalised = finalizePackageDescription
[] (const True) buildPlatform
(CompilerId buildCompilerFlavor (Version [] []))
(unknownCompilerInfo
(CompilerId buildCompilerFlavor (Version [] [])) NoAbiTag)
[] pkg
baseDependency = case finalised of
Right (pkg', _) | not (null baseDeps) ->
......
......@@ -46,6 +46,8 @@ import Distribution.System
( Platform(..), OS, Arch )
import Distribution.Simple.Utils
( currentDir, lowercase )
import Distribution.Simple.Compiler
( CompilerInfo(..) )
import Distribution.Text
( Text(parse) )
......@@ -97,16 +99,23 @@ simplifyCondition cond i = fv . walk $ cond
-- | Simplify a configuration condition using the OS and arch names. Returns
-- the names of all the flags occurring in the condition.
simplifyWithSysParams :: OS -> Arch -> CompilerId -> Condition ConfVar
simplifyWithSysParams :: OS -> Arch -> CompilerInfo -> Condition ConfVar
-> (Condition FlagName, [FlagName])
simplifyWithSysParams os arch (CompilerId comp compVer) cond = (cond', flags)
simplifyWithSysParams os arch cinfo cond = (cond', flags)
where
(cond', flags) = simplifyCondition cond interp
interp (OS os') = Right $ os' == os
interp (Arch arch') = Right $ arch' == arch
interp (Impl comp' vr) = Right $ comp' == comp
&& compVer `withinRange` vr
interp (Flag f) = Left f
interp (Impl comp vr)
| matchImpl (compilerInfoId cinfo) = Right True
| otherwise = case compilerInfoCompat cinfo of
-- fixme: treat Nothing as unknown, rather than empty list once we
-- support partial resolution of system parameters
Nothing -> Right False
Just compat -> Right (any matchImpl compat)
where
matchImpl (CompilerId c v) = comp == c && v `withinRange` vr
interp (Flag f) = Left f
-- TODO: Add instances and check
--
......@@ -208,7 +217,7 @@ resolveWithFlags ::
-- ^ Domain for each flag name, will be tested in order.
-> OS -- ^ OS as returned by Distribution.System.buildOS
-> Arch -- ^ Arch as returned by Distribution.System.buildArch
-> CompilerId -- ^ Compiler flavour + version
-> CompilerInfo -- ^ Compiler information
-> [Dependency] -- ^ Additional constraints
-> [CondTree ConfVar [Dependency] PDTagged]
-> ([Dependency] -> DepTestRslt [Dependency]) -- ^ Dependency test function.
......@@ -463,7 +472,7 @@ finalizePackageDescription ::
-- available packages? If this is unknown then use
-- True.
-> Platform -- ^ The 'Arch' and 'OS'
-> CompilerId -- ^ Compiler + Version
-> CompilerInfo -- ^ Compiler information
-> [Dependency] -- ^ Additional constraints
-> GenericPackageDescription
-> Either [Dependency]
......
......@@ -19,7 +19,7 @@ import qualified Distribution.PackageDescription as PD
( PackageDescription(..), BuildInfo(buildable)
, Benchmark(..), BenchmarkInterface(..), benchmarkType, hasBenchmarks )
import Distribution.Simple.BuildPaths ( exeExtension )
import Distribution.Simple.Compiler ( Compiler(..) )
import Distribution.Simple.Compiler ( compilerInfo )
import Distribution.Simple.InstallDirs
( fromPathTemplate, initialPathTemplateEnv, PathTemplateVariable(..)
, substPathTemplate , toPathTemplate, PathTemplate )
......@@ -124,5 +124,5 @@ benchOption pkg_descr lbi bm template =
where
env = initialPathTemplateEnv
(PD.package pkg_descr) (LBI.pkgKey lbi)
(compilerId $ LBI.compiler lbi) (LBI.hostPlatform lbi) ++
(compilerInfo $ LBI.compiler lbi) (LBI.hostPlatform lbi) ++
[(BenchmarkNameVar, toPathTemplate $ PD.benchmarkName bm)]
......@@ -25,6 +25,7 @@ module Distribution.Simple.Compiler (
module Distribution.Compiler,
Compiler(..),
showCompilerId, compilerFlavor, compilerVersion,
compilerInfo,
-- * Support for package databases
PackageDB(..),
......@@ -65,6 +66,10 @@ import System.Directory (canonicalizePath)
data Compiler = Compiler {
compilerId :: CompilerId,
-- ^ Compiler flavour and version.
compilerAbiTag :: AbiTag,
-- ^ Tag for distinguishing incompatible ABI's on the same architecture/os.
compilerCompat :: [CompilerId],
-- ^ Other implementations that this compiler claims to be compatible with.
compilerLanguages :: [(Language, Flag)],
-- ^ Supported language standards.
compilerExtensions :: [(Extension, Flag)],
......@@ -85,6 +90,13 @@ compilerFlavor = (\(CompilerId f _) -> f) . compilerId
compilerVersion :: Compiler -> Version
compilerVersion = (\(CompilerId _ v) -> v) . compilerId
compilerInfo :: Compiler -> CompilerInfo
compilerInfo c = CompilerInfo (compilerId c)
(compilerAbiTag c)
(Just . compilerCompat $ c)
(Just . map fst . compilerLanguages $ c)
(Just . map fst . compilerExtensions $ c)
-- ------------------------------------------------------------
-- * Package databases
-- ------------------------------------------------------------
......
......@@ -49,6 +49,7 @@ import Distribution.Compiler
import Distribution.Utils.NubList
import Distribution.Simple.Compiler
( CompilerFlavor(..), Compiler(..), compilerFlavor, compilerVersion
, compilerInfo
, showCompilerId, unsupportedLanguages, unsupportedExtensions
, PackageDB(..), PackageDBStack, reexportedModulesSupported
, packageKeySupported, renamingPackageFlagsSupported )
......@@ -389,7 +390,7 @@ configure (pkg_descr0, pbi) cfg
(configConfigurationsFlags cfg)
dependencySatisfiable
compPlatform
(compilerId comp)
(compilerInfo comp)
allConstraints
pkg_descr0''
of Right r -> return r
......
......@@ -92,7 +92,7 @@ import qualified Distribution.Simple.Setup as Cabal
( Flag )
import Distribution.Simple.Compiler
( CompilerFlavor(..), CompilerId(..), Compiler(..), compilerVersion
, OptimisationLevel(..), PackageDB(..), PackageDBStack
, OptimisationLevel(..), PackageDB(..), PackageDBStack, AbiTag(..)
, Flag )
import Distribution.Version
( Version(..), anyVersion, orLaterVersion )
......@@ -162,6 +162,8 @@ configure verbosity hcPath hcPkgPath conf0 = do
let comp = Compiler {
compilerId = CompilerId GHC ghcVersion,
compilerAbiTag = NoAbiTag,
compilerCompat = [],
compilerLanguages = languages,
compilerExtensions = extensions,
compilerProperties = ghcInfoMap
......
......@@ -33,7 +33,7 @@ import Distribution.PackageDescription as PD
, TestSuite(..), TestSuiteInterface(..)
, Benchmark(..), BenchmarkInterface(..) )
import Distribution.Simple.Compiler
( Compiler(..), CompilerFlavor(..), compilerVersion )
( Compiler, compilerInfo, CompilerFlavor(..), compilerVersion )
import Distribution.Simple.GHC ( componentGhcOptions, ghcLibDir )
import Distribution.Simple.Program.GHC
( GhcOptions(..), GhcDynLinkMode(..), renderGhcOptions )
......@@ -588,7 +588,7 @@ haddockPackageFlags lbi clbi htmlTemplate = do
haddockTemplateEnv :: LocalBuildInfo -> PackageIdentifier -> PathTemplateEnv
haddockTemplateEnv lbi pkg_id =
(PrefixVar, prefix (installDirTemplates lbi))
: initialPathTemplateEnv pkg_id (pkgKey lbi) (compilerId (compiler lbi))
: initialPathTemplateEnv pkg_id (pkgKey lbi) (compilerInfo (compiler lbi))
(hostPlatform lbi)
-- ------------------------------------------------------------------------------
......
......@@ -73,6 +73,8 @@ configure verbosity mbHcPath hcPkgPath conf0 = do
let
comp = Compiler {
compilerId = CompilerId (HaskellSuite compName) compVersion,
compilerAbiTag = Compiler.NoAbiTag,
compilerCompat = [],
compilerLanguages = languages,
compilerExtensions = extensions,
compilerProperties = M.empty
......
......@@ -39,6 +39,7 @@ module Distribution.Simple.InstallDirs (
platformTemplateEnv,
compilerTemplateEnv,
packageTemplateEnv,
abiTemplateEnv,
installDirsTemplateEnv,
) where
......@@ -57,7 +58,7 @@ import Distribution.Package
import Distribution.System
( OS(..), buildOS, Platform(..) )
import Distribution.Compiler
( CompilerId, CompilerFlavor(..) )
( AbiTag(..), abiTagString, CompilerInfo(..), CompilerFlavor(..) )
import Distribution.Text
( display )
......@@ -212,7 +213,7 @@ defaultInstallDirs comp userInstall _hasLibs = do
JHC -> "$compiler"
LHC -> "$compiler"
UHC -> "$pkgid"
_other -> "$arch-$os-$compiler" </> "$pkgkey",
_other -> "$abi" </> "$pkgkey",
dynlibdir = "$libdir",
libexecdir = case buildOS of
Windows -> "$prefix" </> "$pkgkey"
......@@ -221,8 +222,8 @@ defaultInstallDirs comp userInstall _hasLibs = do
datadir = case buildOS of
Windows -> "$prefix"
_other -> "$prefix" </> "share",
datasubdir = "$arch-$os-$compiler" </> "$pkgid",
docdir = "$datadir" </> "doc" </> "$arch-$os-$compiler" </> "$pkgid",
datasubdir = "$abi" </> "$pkgid",
docdir = "$datadir" </> "doc" </> "$abi" </> "$pkgid",
mandir = "$datadir" </> "man",
htmldir = "$docdir" </> "html",
haddockdir = "$htmldir",
......@@ -284,7 +285,7 @@ substituteInstallDirTemplates env dirs = dirs'
-- absolute path.
absoluteInstallDirs :: PackageIdentifier
-> PackageKey
-> CompilerId
-> CompilerInfo
-> CopyDest
-> Platform
-> InstallDirs PathTemplate
......@@ -314,7 +315,7 @@ data CopyDest
--
prefixRelativeInstallDirs :: PackageIdentifier
-> PackageKey
-> CompilerId
-> CompilerInfo
-> Platform
-> InstallDirTemplates
-> InstallDirs (Maybe FilePath)
......@@ -372,6 +373,8 @@ data PathTemplateVariable =
| CompilerVar -- ^ The compiler name and version, eg @ghc-6.6.1@
| OSVar -- ^ The operating system name, eg @windows@ or @linux@
| ArchVar -- ^ The CPU architecture name, eg @i386@ or @x86_64@
| AbiVar -- ^ The Compiler's ABI identifier, $arch-$os-$compiler-$abitag
| AbiTagVar -- ^ The optional ABI tag for the compiler
| ExecutableNameVar -- ^ The executable name; used in shell wrappers
| TestSuiteNameVar -- ^ The name of the test suite being run
| TestSuiteResultVar -- ^ The result of the test suite being run, eg
......@@ -410,13 +413,14 @@ substPathTemplate environment (PathTemplate template) =
-- | The initial environment has all the static stuff but no paths
initialPathTemplateEnv :: PackageIdentifier
-> PackageKey
-> CompilerId
-> CompilerInfo
-> Platform
-> PathTemplateEnv
initialPathTemplateEnv pkgId pkg_key compilerId platform =
initialPathTemplateEnv pkgId pkg_key compiler platform =
packageTemplateEnv pkgId pkg_key
++ compilerTemplateEnv compilerId
++ compilerTemplateEnv compiler
++ platformTemplateEnv platform
++ abiTemplateEnv compiler platform
packageTemplateEnv :: PackageIdentifier -> PackageKey -> PathTemplateEnv
packageTemplateEnv pkgId pkg_key =
......@@ -426,9 +430,9 @@ packageTemplateEnv pkgId pkg_key =
,(PkgIdVar, PathTemplate [Ordinary $ display pkgId])
]
compilerTemplateEnv :: CompilerId -> PathTemplateEnv
compilerTemplateEnv compilerId =
[(CompilerVar, PathTemplate [Ordinary $ display compilerId])
compilerTemplateEnv :: CompilerInfo -> PathTemplateEnv
compilerTemplateEnv compiler =
[(CompilerVar, PathTemplate [Ordinary $ display (compilerInfoId compiler)])
]
platformTemplateEnv :: Platform -> PathTemplateEnv
......@@ -437,6 +441,16 @@ platformTemplateEnv (Platform arch os) =
,(ArchVar, PathTemplate [Ordinary $ display arch])
]
abiTemplateEnv :: CompilerInfo -> Platform -> PathTemplateEnv
abiTemplateEnv compiler (Platform arch os) =
[(AbiVar, PathTemplate [Ordinary $ display arch ++ '-':display os ++
'-':display (compilerInfoId compiler) ++
case compilerInfoAbiTag compiler of
NoAbiTag -> ""
AbiTag tag -> '-':tag])
,(AbiTagVar, PathTemplate [Ordinary $ abiTagString (compilerInfoAbiTag compiler)])
]
installDirsTemplateEnv :: InstallDirs PathTemplate -> PathTemplateEnv
installDirsTemplateEnv dirs =
[(PrefixVar, prefix dirs)
......@@ -475,6 +489,8 @@ instance Show PathTemplateVariable where
show CompilerVar = "compiler"
show OSVar = "os"
show ArchVar = "arch"
show AbiTagVar = "abitag"
show AbiVar = "abi"
show ExecutableNameVar = "executablename"
show TestSuiteNameVar = "test-suite"
show TestSuiteResultVar = "result"
......@@ -502,6 +518,8 @@ instance Read PathTemplateVariable where
,("compiler", CompilerVar)
,("os", OSVar)
,("arch", ArchVar)
,("abitag", AbiTagVar)
,("abi", AbiVar)
,("executablename", ExecutableNameVar)
,("test-suite", TestSuiteNameVar)
,("result", TestSuiteResultVar)
......
......@@ -29,7 +29,7 @@ import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.BuildPaths
( autogenModulesDir, exeExtension )
import Distribution.Simple.Compiler
( CompilerFlavor(..), CompilerId(..), Compiler(..)
( CompilerFlavor(..), CompilerId(..), Compiler(..), AbiTag(..)
, PackageDBStack, Flag, languageToFlags, extensionsToFlags )
import Language.Haskell.Extension
( Language(Haskell98), Extension(..), KnownExtension(..))
......@@ -76,6 +76,8 @@ configure verbosity hcPath _hcPkgPath conf = do
let Just version = programVersion jhcProg
comp = Compiler {
compilerId = CompilerId JHC version,
compilerAbiTag = NoAbiTag,
compilerCompat = [],
compilerLanguages = jhcLanguages,
compilerExtensions = jhcLanguageExtensions,
compilerProperties = M.empty
......
......@@ -73,7 +73,7 @@ import Distribution.Simple.Program
import qualified Distribution.Simple.Program.HcPkg as HcPkg
import Distribution.Simple.Compiler
( CompilerFlavor(..), CompilerId(..), Compiler(..), compilerVersion
, OptimisationLevel(..), PackageDB(..), PackageDBStack
, OptimisationLevel(..), PackageDB(..), PackageDBStack, AbiTag(..)
, Flag, languageToFlags, extensionsToFlags )
import Distribution.Version
( Version(..), orLaterVersion )
......@@ -126,6 +126,8 @@ configure verbosity hcPath hcPkgPath conf = do
let comp = Compiler {
compilerId = CompilerId LHC lhcVersion,
compilerAbiTag = NoAbiTag,
compilerCompat = [],
compilerLanguages = languages,
compilerExtensions = extensions,
compilerProperties = M.empty
......
......@@ -72,7 +72,7 @@ import Distribution.Package
( PackageId, Package(..), InstalledPackageId(..), PackageKey
, PackageName )
import Distribution.Simple.Compiler
( Compiler(..), PackageDBStack, OptimisationLevel )
( Compiler, compilerInfo, PackageDBStack, OptimisationLevel )
import Distribution.Simple.PackageIndex
( InstalledPackageIndex )
import Distribution.ModuleName ( ModuleName )
......@@ -413,7 +413,7 @@ absoluteInstallDirs pkg lbi copydest =
InstallDirs.absoluteInstallDirs
(packageId pkg)
(pkgKey lbi)
(compilerId (compiler lbi))
(compilerInfo (compiler lbi))
copydest
(hostPlatform lbi)
(installDirTemplates lbi)
......@@ -425,7 +425,7 @@ prefixRelativeInstallDirs pkg_descr lbi =
InstallDirs.prefixRelativeInstallDirs
(packageId pkg_descr)
(pkgKey lbi)
(compilerId (compiler lbi))
(compilerInfo (compiler lbi))
(hostPlatform lbi)
(installDirTemplates lbi)
......@@ -436,5 +436,5 @@ substPathTemplate pkgid lbi = fromPathTemplate
where env = initialPathTemplateEnv
pkgid
(pkgKey lbi)
(compilerId (compiler lbi))
(compilerInfo (compiler lbi))
(hostPlatform lbi)
......@@ -19,7 +19,7 @@ import qualified Distribution.PackageDescription as PD
( PackageDescription(..), BuildInfo(buildable)
, TestSuite(..)
, TestSuiteInterface(..), testType, hasTests )
import Distribution.Simple.Compiler ( Compiler(..) )
import Distribution.Simple.Compiler ( compilerInfo )
import Distribution.Simple.Hpc ( markupPackage )
import Distribution.Simple.InstallDirs
( fromPathTemplate, initialPathTemplateEnv, substPathTemplate
......@@ -133,4 +133,4 @@ packageLogPath template pkg_descr lbi =
where
env = initialPathTemplateEnv
(PD.package pkg_descr) (LBI.pkgKey lbi)
(compilerId $ LBI.compiler lbi) (LBI.hostPlatform lbi)
(compilerInfo $ LBI.compiler lbi) (LBI.hostPlatform lbi)
......@@ -7,7 +7,7 @@ import Distribution.Compat.Environment ( getEnvironment )
import qualified Distribution.PackageDescription as PD
import Distribution.Simple.Build.PathsModule ( pkgPathEnvVar )
import Distribution.Simple.BuildPaths ( exeExtension )
import Distribution.Simple.Compiler ( Compiler(..) )
import Distribution.Simple.Compiler ( compilerInfo )
import Distribution.Simple.Hpc ( markupTest, tixDir, tixFilePath )
import Distribution.Simple.InstallDirs
( fromPathTemplate, initialPathTemplateEnv, PathTemplateVariable(..)
......@@ -151,5 +151,5 @@ testOption pkg_descr lbi suite template =
where
env = initialPathTemplateEnv
(PD.package pkg_descr) (LBI.pkgKey lbi)
(compilerId $ LBI.compiler lbi) (LBI.hostPlatform lbi) ++
(compilerInfo $ LBI.compiler lbi) (LBI.hostPlatform lbi) ++
[(TestSuiteNameVar, toPathTemplate $ PD.testName suite)]
......@@ -13,7 +13,7 @@ import Distribution.ModuleName ( ModuleName )
import qualified Distribution.PackageDescription as PD
import Distribution.Simple.Build.PathsModule ( pkgPathEnvVar )
import Distribution.Simple.BuildPaths ( exeExtension )
import Distribution.Simple.Compiler ( Compiler(..) )
import Distribution.Simple.Compiler ( compilerInfo )
import Distribution.Simple.Hpc ( markupTest, tixDir, tixFilePath )
import Distribution.Simple.InstallDirs
( fromPathTemplate, initialPathTemplateEnv, PathTemplateVariable(..)
......@@ -153,7 +153,7 @@ testOption pkg_descr lbi suite template =
where
env = initialPathTemplateEnv
(PD.package pkg_descr) (LBI.pkgKey lbi)
(compilerId $ LBI.compiler lbi) (LBI.hostPlatform lbi) ++
(compilerInfo $ LBI.compiler lbi) (LBI.hostPlatform lbi) ++
[(TestSuiteNameVar, toPathTemplate $ PD.testName suite)]
-- Test stub ----------
......
......@@ -13,7 +13,7 @@ module Distribution.Simple.Test.Log
import Distribution.Package ( PackageId )
import qualified Distribution.PackageDescription as PD
import Distribution.Simple.Compiler ( Compiler(..), CompilerId )
import Distribution.Simple.Compiler ( Compiler(..), compilerInfo, CompilerId )
import Distribution.Simple.InstallDirs
( fromPathTemplate, initialPathTemplateEnv, PathTemplateVariable(..)
, substPathTemplate , toPathTemplate, PathTemplate )
......@@ -114,7 +114,7 @@ testSuiteLogPath template pkg_descr lbi name result =
where
env = initialPathTemplateEnv
(PD.package pkg_descr) (LBI.pkgKey lbi)
(compilerId $ LBI.compiler lbi) (LBI.hostPlatform lbi)
(compilerInfo $ LBI.compiler lbi) (LBI.hostPlatform lbi)
++ [ (TestSuiteNameVar, toPathTemplate name)
, (TestSuiteResultVar, toPathTemplate $ resultString result)
]
......
......@@ -54,6 +54,8 @@ configure verbosity hcPath _hcPkgPath conf = do
let comp = Compiler {
compilerId = CompilerId UHC uhcVersion,
compilerAbiTag = C.NoAbiTag,
compilerCompat = [],
compilerLanguages = uhcLanguages,
compilerExtensions = uhcLanguageExtensions,
compilerProperties = M.empty
......
......@@ -347,21 +347,21 @@ package:
In the simple build system, _dir_ may contain the following path
variables: `$pkgid`, `$pkg`, `$version`, `$compiler`, `$os`,
`$arch`
`$arch`, `$abi`, `$abitag`
`--bindir=`_dir_
: Executables that the user might invoke are installed here.
In the simple build system, _dir_ may contain the following path
variables: `$prefix`, `$pkgid`, `$pkg`, `$version`, `$compiler`,
`$os`, `$arch`
`$os`, `$arch`, `$abi`, `$abitag
`--libdir=`_dir_
: Object-code libraries are installed here.
In the simple build system, _dir_ may contain the following path
variables: `$prefix`, `$bindir`, `$pkgid`, `$pkg`, `$version`,
`$compiler`, `$os`, `$arch`
`$compiler`, `$os`, `$arch`, `$abi`, `$abitag`
`--libexecdir=`_dir_
: Executables that are not expected to be invoked directly by the user
......@@ -369,21 +369,21 @@ package:
In the simple build system, _dir_ may contain the following path
variables: `$prefix`, `$bindir`, `$libdir`, `$libsubdir`, `$pkgid`,
`$pkg`, `$version`, `$compiler`, `$os`, `$arch`
`$pkg`, `$version`, `$compiler`, `$os`, `$arch`, `$abi`, `$abitag`
`--datadir`=_dir_
: Architecture-independent data files are installed here.
In the simple build system, _dir_ may contain the following path
variables: `$prefix`, `$bindir`, `$libdir`, `$libsubdir`, `$pkgid`, `$pkg`,
`$version`, `$compiler`, `$os`, `$arch`
`$version`, `$compiler`, `$os`, `$arch`, `$abi`, `$abitag`
`--sysconfdir=`_dir_
: Installation directory for the configuration files.
In the simple build system, _dir_ may contain the following path variables:
`$prefix`, `$bindir`, `$libdir`, `$libsubdir`, `$pkgid`, `$pkg`, `$version`,
`$compiler`, `$os`, `$arch`
`$compiler`, `$os`, `$arch`, `$abi`, `$abitag`
In addition the simple build system supports the following installation path options:
......@@ -395,34 +395,34 @@ In addition the simple build system supports the following installation path opt
libraries would be installed in `/usr/local/lib/mypkg-0.2/ghc-6.4`.
_dir_ may contain the following path variables: `$pkgid`, `$pkg`,
`$version`, `$compiler`, `$os`, `$arch`
`$version`, `$compiler`, `$os`, `$arch`, `$abi`, `$abitag`
`--datasubdir=`_dir_
: A subdirectory of _datadir_ in which data files are actually
installed.
_dir_ may contain the following path variables: `$pkgid`, `$pkg`,
`$version`, `$compiler`, `$os`, `$arch`