[commit: ghc] master: Make the rule for .hi files depend on the .hs/.lhs files (5cb0880)

Ian Lynagh ian at well-typed.com
Thu Jan 10 22:02:37 CET 2013


On Thu, Jan 10, 2013 at 08:44:21PM +0000, Simon Marlow wrote:
> On 10/01/13 19:24, Ian Lynagh wrote:
> >
> >commit 5cb088088be8573a01c991421ad882ce899067db
> >Author: Ian Lynagh <ian at well-typed.com>
> >Date:   Sat Jan 5 18:50:29 2013 +0000
> >
> >     Make the rule for .hi files depend on the .hs/.lhs files
> >
> >     make thought that it could make a .hi file for the C files in
> >     libraries, which was causing problems when using dynamic-too.
> 
> Are you sure?  This rule is *very* delicate (see the comments).
> Won't this change cause make to think that it can build the .hi file
> by not doing anything?

I hesitate to say I'm sure, but I don't see the problem.

The old rule was roughly:

    %.hi: %.o ;

and I could break the change into 2 parts, first changing it to
something like:

    a/%.hi: a/%.o ;

and then to something like:

    a/%.hi: a/%.o b/%.hs ;

Which step do you think is wrong, and why?

> >+define hi-rule # $1 = source directory, $2 = object directory, $3 = way
> >
> >-%.$$($1_hisuf) : %.$$($1_osuf) ;
> >+$2/%.$$($3_hisuf) : $2/%.$$($3_osuf) $1/%.hs ;


Thanks
Ian




More information about the ghc-devs mailing list