X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDynFlags.hs;h=ed5f359b9c8fe87860443e84f525f259603eac2c;hb=a9c09ca0546d62408356bc83bca92d8e88a5df7f;hp=dbb791ef63d693120d34c022c8bfc58c2122b9eb;hpb=a33ae68ab331a16fbb6e7d6931d1c38bd8f37a85;p=ghc-hetmet.git diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index dbb791e..ed5f359 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -1652,32 +1652,9 @@ splitPathList s = filter notNull (splitUp s) -- tmpDir, where we store temporary files. setTmpDir :: FilePath -> DynFlags -> DynFlags -setTmpDir dir dflags = dflags{ tmpDir = canonicalise dir } - where -#if !defined(mingw32_HOST_OS) - canonicalise p = normalise p -#else - -- Canonicalisation of temp path under win32 is a bit more - -- involved: (a) strip trailing slash, - -- (b) normalise slashes - -- (c) just in case, if there is a prefix /cygdrive/x/, change to x: - canonicalise path = removeTrailingSlash $ normalise $ xltCygdrive path - - -- if we're operating under cygwin, and TMP/TEMP is of - -- the form "/cygdrive/drive/path", translate this to - -- "drive:/path" (as GHC isn't a cygwin app and doesn't - -- understand /cygdrive paths.) - cygdrivePrefix = [pathSeparator] ++ "/cygdrive/" ++ [pathSeparator] - xltCygdrive path = case maybePrefixMatch cygdrivePrefix path of - Just (drive:sep:xs) - | isPathSeparator sep -> drive:':':pathSeparator:xs - _ -> path - - -- strip the trailing backslash (awful, but we only do this once). - removeTrailingSlash path - | isPathSeparator (last path) = init path - | otherwise = path -#endif +setTmpDir dir dflags = dflags{ tmpDir = normalise dir } + -- we used to fix /cygdrive/c/.. on Windows, but this doesn't + -- seem necessary now --SDM 7/2/2008 ----------------------------------------------------------------------------- -- Hpc stuff