import qualified GHC
import GHC ( Session, ModSummary(..) )
import DynFlags
-import Util ( escapeSpaces )
+import Util
import HscTypes ( HscEnv, IsBootInterface, msObjFilePath, msHsFilePath )
import SysTools ( newTempName )
import qualified SysTools
-----------------------------
writeDependency :: Handle -> [FilePath] -> FilePath -> IO ()
-- (writeDependency h [t1,t2] dep) writes to handle h the dependency
--- t1 t2 : dep
+-- t1 t2 : dep
writeDependency hdl targets dep
- = hPutStrLn hdl (unwords (map escapeSpaces targets) ++ " : "
- ++ escapeSpaces dep)
+ = hPutStrLn hdl (unwords (map forOutput targets) ++ " : " ++ forOutput dep)
+ where forOutput = escapeSpaces . reslash Forwards . normalise
-----------------------------
insertSuffixes
insertSuffixes file_name extras
= file_name : [ basename <.> (extra ++ "_" ++ suffix) | extra <- extras ]
where
- (basename, suffix) = splitExtension file_name
+ (basename, suffix) = case splitExtension file_name of
+ -- Drop the "." from the extension
+ (b, s) -> (b, drop 1 s)
-----------------------------------------------------------------