> I am going to install hmake and upgrade to ghc 5 but in the 
> meantime I decided to use make.
> 
> I am puzzled however. Presumably building a module that 
> imports a module needs the .hi file and therefore the 
> makefile should be something like this:
> 
> Tagsv1.o : Tagsv1.hs
>       ghc -c Tagsv1.hs -package lang
> 
> Basev1.o : Tagsv1.hi Basev1.hs
>       ghc -c Basev1.hs -package lang
> 
> But if I do this then make complains if I want to see what it 
> will generate
> 
> [dom@lhrtba8fd85 maketest]$ make -n
> ghc -c Tagsv1.hs -package lang
> make: *** No rule to make target `Tagsv1.hi', needed by 
> `Basev1.o'.  Stop.     
> 
> Running make works as by the time the rule gets executed the 
> .hi file exists.
> 
> Can anyone suggest something better?

GHC's documentation has some useful tips on using make with Haskell:

        
http://www.haskell.org/ghc/docs/latest/set/separate-compilation.html#USI
NG-MAKE

Chees,
        Simon

_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to