X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Futils%2Fhsc2hs%2FKludgedSystem.hs;h=66e900ccad7a853c242b9814800ad3e7f1a3972c;hb=6325224865952e221946ff8e5f6d299b159eddce;hp=4036df6c2f8a956d060dad39bcfea96557fc3c7b;hpb=c69fc1ae9231717e81f268d4d522c1770d9fdb14;p=ghc-hetmet.git diff --git a/ghc/utils/hsc2hs/KludgedSystem.hs b/ghc/utils/hsc2hs/KludgedSystem.hs index 4036df6..66e900c 100644 --- a/ghc/utils/hsc2hs/KludgedSystem.hs +++ b/ghc/utils/hsc2hs/KludgedSystem.hs @@ -1,6 +1,6 @@ {-# OPTIONS -cpp -fglasgow-exts #-} ----------------------------------------------------------------------------- --- $Id: KludgedSystem.hs,v 1.6 2001/04/02 16:10:05 rrt Exp $ +-- $Id: KludgedSystem.hs,v 1.8 2001/07/04 09:18:38 sewardj Exp $ -- system that works feasibly under Windows (i.e. passes the command line to sh, -- because system() under Windows doesn't look at SHELL, and always uses CMD.EXE) @@ -9,12 +9,14 @@ module KludgedSystem (system, defaultCompiler, progNameSuffix) where #include "../../includes/config.h" +import Config + #ifndef mingw32_TARGET_OS import System (system) defaultCompiler :: String -defaultCompiler = "gcc" +defaultCompiler = cGCC progNameSuffix = "" #else @@ -23,7 +25,6 @@ import qualified System import System (ExitCode) import IO (bracket_) import Directory (removeFile) -import Config system :: String -> IO ExitCode system cmd = do @@ -35,7 +36,7 @@ system cmd = do foreign import "_getpid" unsafe getProcessID :: IO Int defaultCompiler :: String -defaultCompiler = "gcc -mno-cygwin -mwin32" +defaultCompiler = cGCC ++ " -mno-cygwin" progNameSuffix = ".exe" #endif /* mingw32_TARGET_OS */