Make.hs 509 Bytes
Newer Older
1 2
module Settings.Builders.Make (makeBuilderArgs) where

3
import Settings.Builders.Common
4 5

makeBuilderArgs :: Args
6 7
makeBuilderArgs = do
    threads <- shakeThreads <$> lift getShakeOptions
Andrey Mokhov's avatar
Andrey Mokhov committed
8
    let t = show $ max 4 (threads - 2) -- Don't use all Shake's threads
9
    mconcat
Andrey Mokhov's avatar
Andrey Mokhov committed
10 11 12
        [ builder (Make gmpBuildPath     ) ? append ["MAKEFLAGS=-j" ++ t]
        , builder (Make libffiBuildPath  ) ? append ["MAKEFLAGS=-j" ++ t, "install"]
        , builder (Make "testsuite/tests") ? append ["THREADS=" ++ t, "fast"] ]