File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(..))
1313import Distribution.Simple.Program (gccProgram , lookupProgram , runProgram )
1414import Distribution.Simple.Setup (BuildFlags )
1515import Distribution.Simple.Utils (die , rawSystemStdout )
16+ import Distribution.System (OS (.. ), buildOS )
1617import Distribution.Verbosity (silent )
1718
1819main :: IO ()
@@ -27,11 +28,16 @@ main = defaultMainWithHooks
2728 mkDerivedGmpConstants pkg_descr lbi userHooks flags =
2829 case lookupProgram gccProgram (withPrograms lbi) of
2930 Just gcc ->
30- let path = " src" </> " mkDerivedGmpConstants " in do
31+ let path = " src" </> exeName in do
3132 runProgram silent gcc
3233 [" bin" </> " mkDerivedGmpConstants.c" , " -o" , path]
3334 output <- rawSystemStdout silent path []
3435 writeFile (" cbits" </> " GmpDerivedConstants.h" ) output
3536 removeFile path
3637 buildHook simpleUserHooks pkg_descr lbi userHooks flags
3738 Nothing -> die " Failed to find GCC!"
39+ where
40+ exeName :: FilePath
41+ exeName = case buildOS of
42+ Windows -> " mkDerivedGmpConstants.exe"
43+ _ -> " mkDerivedGmpConstants"
You can’t perform that action at this time.
0 commit comments