@@ -57,7 +57,7 @@ import SourceMap
5757
5858import System.Directory
5959 (doesFileExist, getModificationTime, createDirectoryIfMissing, getCurrentDirectory)
60−import System.FilePath ((</>), takeDirectory, makeRelative, splitPath)
60+import System.FilePath ((</>), takeDirectory, makeRelative, splitPath, normalise)
6161import System.IO.Error (tryIOError)
6262import System.IO.UTF8 (readUTF8File, writeUTF8File)
6363
@@ -351,7 +351,7 @@ buildMakeActions outputDir filePathMap foreigns usePrefix =
351351
352352 genSourceMap :: String -> String -> Int -> [SMap] -> Make ()
353353 genSourceMap dir mapFile extraLines mappings = do
354− let pathToDir = iterate (".." </>) ".." !! length (splitPath outputDir)
354+ let pathToDir = iterate (".." </>) ".." !! length (splitPath $ normalise outputDir)
355355 sourceFile = case mappings of
356356 ((SMap file _ _):_) -> Just $ pathToDir </> makeRelative dir file
357357 _ -> Nothing