120a121,125
> # the new ghc (6.4) produces different dep files
> #  If we add -odir outputdir to the ghc-M call we get proper dirs for the .o entries.
> #  However the .hi entries remain wrong. 
> #  Since we want to convert them to .o we need to substitude the directory names by our own using sed
> #  We use grep to filter only these lines, which contain dependecies of the output file
122,123c127,129
< make-hs-deps	=$(HC) $(2) $(3) -M -optdep-f -optdep$(basename $(1)).d.in && \
< 		 sed -e 's|$(basename $(2))|$(basename $(1))|' -e 's|\.hi|\.o|g' $(basename $(1)).d.in > $(basename $(1)).d && \
---
> make-hs-deps	=$(HC) $(2) $(3) -M -odir $(dir $(1)) -optdep-f -optdep$(basename $(1)).d.in && \
> 		 grep "$(notdir $(1))" $(basename $(1)).d.in | \
> 		 sed -e 's|$(dir $(2))\(.*\)\.hi|$(dir $(1))\1.o|'  > $(basename $(1)).d && \
124a131,132
> # old
> #		 sed -e 's|$(basename $(2))|$(basename $(1))|' -e 's|\.hi|\.o|g' $(basename $(1)).d.in > $(basename $(1)).d  
