X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FTmpFiles.hs;h=a1eae3bf030471275dd8390141dcd01da3c02a22;hb=c95b86624e5048b972e8b2a975ee7d09366df3bb;hp=68ced530d9c968a20e8934cd47a527cf1d65067d;hpb=a48cb161bb6986a437c97c08b3bd1a3edbe8ba1d;p=ghc-hetmet.git diff --git a/ghc/compiler/main/TmpFiles.hs b/ghc/compiler/main/TmpFiles.hs index 68ced53..a1eae3b 100644 --- a/ghc/compiler/main/TmpFiles.hs +++ b/ghc/compiler/main/TmpFiles.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: TmpFiles.hs,v 1.17 2001/04/18 11:58:02 sewardj Exp $ +-- $Id: TmpFiles.hs,v 1.21 2001/05/29 17:53:59 sof Exp $ -- -- Temporary file management -- @@ -87,7 +87,11 @@ removeTmpFiles verb fs = do blowAway f = (do when verbose (hPutStrLn stderr ("Removing: " ++ f)) if '*' `elem` f - then kludgedSystem ("rm -f " ++ f) "Cleaning temp files" >> return () +#if defined(mingw32_TARGET_OS) && defined(MINIMAL_UNIX_DEPS) + then kludgedSystem (unwords [cRM, dosifyPath f]) "Cleaning temp files" >> return () +#else + then kludgedSystem (unwords [cRM, f]) "Cleaning temp files" >> return () +#endif else removeFile f) `catchAllIO` (\_ -> when verbose (hPutStrLn stderr @@ -99,8 +103,10 @@ removeTmpFiles verb fs = do -- because system() under Windows doesn't look at SHELL, and always uses CMD.EXE) kludgedSystem cmd phase_name = do -#ifndef mingw32_TARGET_OS - la la la +#if !defined(mingw32_TARGET_OS) || defined(MINIMAL_UNIX_DEPS) + -- in the case where we do want to use an MSDOS command shell, we assume + -- that files and paths have been converted to a form that's + -- understandable to the command we're invoking. exit_code <- system cmd `catchAllIO` (\_ -> throwDyn (PhaseFailed phase_name (ExitFailure 1))) #else