@@ -57,7 +57,7 @@ import SourceMap
58import System.Directory
58import System.Directory
59 (doesFileExist, getModificationTime, createDirectoryIfMissing, getCurrentDirectory)
59 (doesFileExist, getModificationTime, createDirectoryIfMissing, getCurrentDirectory)
60−import System.FilePath ((</>), takeDirectory, makeRelative, splitPath)
60+import System.FilePath ((</>), takeDirectory, makeRelative, splitPath, normalise)
61import System.IO.Error (tryIOError)
61import System.IO.Error (tryIOError)
62import System.IO.UTF8 (readUTF8File, writeUTF8File)
62import System.IO.UTF8 (readUTF8File, writeUTF8File)
@@ -351,7 +351,7 @@ buildMakeActions outputDir filePathMap foreigns usePrefix =
352 genSourceMap :: String -> String -> Int -> [SMap] -> Make ()
352 genSourceMap :: String -> String -> Int -> [SMap] -> Make ()
353 genSourceMap dir mapFile extraLines mappings = do
353 genSourceMap dir mapFile extraLines mappings = do
354− let pathToDir = iterate (".." </>) ".." !! length (splitPath outputDir)
354+ let pathToDir = iterate (".." </>) ".." !! length (splitPath $ normalise outputDir)
355 sourceFile = case mappings of
355 sourceFile = case mappings of
356 ((SMap file _ _):_) -> Just $ pathToDir </> makeRelative dir file
356 ((SMap file _ _):_) -> Just $ pathToDir </> makeRelative dir file
357 _ -> Nothing
357 _ -> Nothing