Building Programs Again

Steinitz, Dominic J Dominic.J.Steinitz@BritishAirways.com
28 May 2001 13:05:48 Z


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?

Dominic.

-------------------------------------------------------------------------------------------------
21st century air travel     http://www.britishairways.com