rawSystemEmit :: FilePath -- ^Script name -> Bool -- ^if true, emit, if false, run -> Int -- ^Verbosity -> FilePath -- ^Program to run -> [String] -- ^Args -> IO () rawSystemEmit _ False verbosity path args = rawSystemExit verbosity path args rawSystemEmit scriptName True verbosity path args = writeFile scriptName ("#!/bin/sh\n\n" ++ (path ++ concatMap (' ':) args) ++ "\n") >> putStrLn (path ++ concatMap (' ':) args) -- build the executables sequence_ [rawSystemExit (compilerPath (compiler lbi)) ["--make", modName, "-o" ++ exeName] | (exeName, modName, _) <- executables pkg_descr] TestLabel "Config" $ TestList [ "config prefix ghc given package tool" ~: "failed" ~: basicGhcConfig ~=? (parseArgs ["--prefix=/lib", "--ghc", "--with-compiler=/bin/ghc", "--with-pkg=/bin/ghc-pkg", "configure"]), "find package tool" ~: "failed" ~: basicGhcConfig ~=? (parseArgs ["--prefix=/lib", "--ghc", "--with-compiler=/bin/ghc", "configure"]), "locate compiler and package tool" ~: "failed" ~: realGhcConfig ~=? (parseArgs ["configure", "--ghc"]), "should we default to the current compiler?" ~: "failed" ~: realGhcConfig ~=? (parseArgs ["configure"])], let basicGhcConfig = (ConfigCmd [Prefix "/lib", GhcFlag, (LocalBuildInfo "/lib" (Compiler GHC "/bin/ghc" "/bin/ghc-pkg")), []) let realGhcConfig = (ConfigCmd (LocalBuildInfo "" (Compiler Hugs "" "")), [])