Commit 47c7ab17 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Add GhcSplit and Unlit builders.

parent 7e4f9033
......@@ -23,6 +23,9 @@ hsc2hs = @hardtop@/inplace/bin/hsc2hs
genprimopcode = @hardtop@/inplace/bin/genprimopcode
unlit = @hardtop@/inplace/lib/unlit
ghc-split = @hardtop@/inplace/lib/ghc-split
ld = @LdCmd@
ar = @ArCmd@
alex = @AlexCmd@
......@@ -43,6 +46,7 @@ solaris-broken-shld = @SOLARIS_BROKEN_SHLD@
split-objects-broken = @SplitObjsBroken@
ghc-unregisterised = @Unregisterised@
ghc-source-path = @hardtop@
leading-underscore = @LeadingUnderscore@
# Information about host and target systems:
#===========================================
......
{-# LANGUAGE DeriveGeneric #-}
module Builder (Builder (..), builderPath, specified, needBuilder) where
module Builder (
Builder (..), builderPath, getBuilderPath, specified, needBuilder
) where
import Base
import GHC.Generics (Generic)
......@@ -24,11 +26,13 @@ data Builder = Alex
| GhcCabalHsColour
| GhcM Stage
| GhcPkg Stage
| GhcSplit
| Haddock
| Happy
| HsColour
| Hsc2Hs
| Ld
| Unlit
deriving (Show, Eq, Generic)
-- Configuration files refer to Builders as follows:
......@@ -49,11 +53,13 @@ builderKey builder = case builder of
GhcCabalHsColour -> builderKey $ GhcCabal -- synonym for 'GhcCabal hscolour'
GhcPkg Stage0 -> "system-ghc-pkg"
GhcPkg _ -> "ghc-pkg"
GhcSplit -> "ghc-split"
Happy -> "happy"
Haddock -> "haddock"
HsColour -> "hscolour"
Hsc2Hs -> "hsc2hs"
Ld -> "ld"
Unlit -> "unlit"
builderPath :: Builder -> Action FilePath
builderPath builder = do
......@@ -62,6 +68,9 @@ builderPath builder = do
++ "' in configuration files."
fixAbsolutePathOnWindows $ if null path then "" else path -<.> exe
getBuilderPath :: Builder -> ReaderT a Action FilePath
getBuilderPath = lift . builderPath
specified :: Builder -> Action Bool
specified = fmap (not . null) . builderPath
......
Supports Markdown
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