-writeDependency hdl targets dep
- = hPutStrLn hdl (unwords (map forOutput targets) ++ " : " ++ forOutput dep)
- where forOutput = escapeSpaces . reslash Forwards . normalise
+writeDependency root hdl targets dep
+ = do let -- We need to avoid making deps on
+ -- c:/foo/...
+ -- on cygwin as make gets confused by the :
+ -- Making relative deps avoids some instances of this.
+ dep' = makeRelative root dep
+ forOutput = escapeSpaces . reslash Forwards . normalise
+ output = unwords (map forOutput targets) ++ " : " ++ forOutput dep'
+ hPutStrLn hdl output