Dependency tracking of .hsc prerequisites (and more warnings)

Simon Marlow marlowsd at gmail.com
Mon Sep 3 12:54:19 CEST 2012


On 31/08/2012 15:40, Gabor Greif wrote:
> It appears that the make system does not track .h -> .hsc include
> dependencies when building the .hs targets.
>
> I came across this when warnings I saw in "make clean all" did not
> appear upon touching
> a certain header. N.B. this is while building a PPC cross-compiler to
> be hosted on x86_64.

Yes, I don't think we implemented dependency tracking for .hsc files, 
although the .hs files that they generated have their dependencies 
tracked as usual.  Probably it would mean modifying hsc2hs with an extra 
option to call 'gcc -M', and then hooking this up to the build system.


> The dependencies are not tracked for mkDerivedConstants.c either -- I
> am looking into this one -- as
> it could probably be tackled just like other .c sources.

They should be tracked, this could just be a bug.  It is easy to get the 
filename(s) wrong in the generated .mk file, and no errors will be 
generated, just the dependency doesn't work.

Cheers,
	Simon




More information about the Cvs-ghc mailing list