From: rrt Date: Mon, 2 Apr 2001 16:10:05 +0000 (+0000) Subject: [project @ 2001-04-02 16:10:05 by rrt] X-Git-Tag: Approximately_9120_patches~2230 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c69fc1ae9231717e81f268d4d522c1770d9fdb14;p=ghc-hetmet.git [project @ 2001-04-02 16:10:05 by rrt] Add .exe to progName on Windows. --- diff --git a/ghc/utils/hsc2hs/KludgedSystem.hs b/ghc/utils/hsc2hs/KludgedSystem.hs index 6f160d7..4036df6 100644 --- a/ghc/utils/hsc2hs/KludgedSystem.hs +++ b/ghc/utils/hsc2hs/KludgedSystem.hs @@ -1,11 +1,11 @@ {-# OPTIONS -cpp -fglasgow-exts #-} ----------------------------------------------------------------------------- --- $Id: KludgedSystem.hs,v 1.5 2001/03/27 16:33:17 rrt Exp $ +-- $Id: KludgedSystem.hs,v 1.6 2001/04/02 16:10:05 rrt 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) -module KludgedSystem (system, defaultCompiler) where +module KludgedSystem (system, defaultCompiler, progNameSuffix) where #include "../../includes/config.h" @@ -15,6 +15,7 @@ import System (system) defaultCompiler :: String defaultCompiler = "gcc" +progNameSuffix = "" #else @@ -35,5 +36,6 @@ foreign import "_getpid" unsafe getProcessID :: IO Int defaultCompiler :: String defaultCompiler = "gcc -mno-cygwin -mwin32" +progNameSuffix = ".exe" #endif /* mingw32_TARGET_OS */ diff --git a/ghc/utils/hsc2hs/Main.hs b/ghc/utils/hsc2hs/Main.hs index b888f33..4827905 100644 --- a/ghc/utils/hsc2hs/Main.hs +++ b/ghc/utils/hsc2hs/Main.hs @@ -1,5 +1,5 @@ ------------------------------------------------------------------------ --- $Id: Main.hs,v 1.29 2001/03/29 17:56:18 qrczak Exp $ +-- $Id: Main.hs,v 1.30 2001/04/02 16:10:05 rrt Exp $ -- -- Program for converting .hsc files to .hs files, by converting the -- file into a C program which is run to generate the Haskell source. @@ -11,7 +11,7 @@ import GetOpt import System (getProgName, getArgs, ExitCode(..), exitWith, exitFailure) -import KludgedSystem (system, defaultCompiler) +import KludgedSystem import Directory (removeFile) import Monad (MonadPlus(..), liftM, liftM2, when, unless) import Char (isAlpha, isAlphaNum, isSpace, isDigit, toUpper, intToDigit, ord) @@ -430,7 +430,7 @@ output flags name toks = do let cProgName = outDir++outBase++"_hsc_make.c" oProgName = outDir++outBase++"_hsc_make.o" - progName = outDir++outBase++"_hsc_make" + progName = outDir++outBase++"_hsc_make" ++ progNameSuffix outHName = outDir++outBase++"_hsc.h" outCName = outDir++outBase++"_hsc.c"