module Settings.Builders.Make (makeBuilderArgs) where

import Base
import Predicate
import Settings

makeBuilderArgs :: Args
makeBuilderArgs = do
    threads <- shakeThreads <$> lift getShakeOptions
    let j = "-j" ++ show threads
    mconcat
        [ builder (Make gmpBuildPath     ) ? append ["MAKEFLAGS=" ++ j]
        , builder (Make libffiBuildPath  ) ? append ["MAKEFLAGS=" ++ j, "install"]
        , builder (Make "testsuite/tests") ? arg "fast" ]

module Settings.Builders.Make (makeBuilderArgs) where

import Base
import Predicate
import Settings

makeBuilderArgs :: Args
makeBuilderArgs = do
    threads <- shakeThreads <$> lift getShakeOptions
    let j = "-j" ++ show threads
    mconcat
        [ builder (Make gmpBuildPath     ) ? append ["MAKEFLAGS=" ++ j]
        , builder (Make libffiBuildPath  ) ? append ["MAKEFLAGS=" ++ j, "install"]
        , builder (Make "testsuite/tests") ? append ["THREADS=" ++ show threads, "fast"]  ]

Set `THREADS` when running validate
Set `THREADS` when running validate

GHC testsuite uses the `THREADS` env variable (and not the make's `-j`
setting) to control the parallelism. This commit sets THREADS to the
value of `shakeThreads`.
