cvs commit: fptools/libraries/Cabal/Distribution/Simple Build.hs

Simon Marlow simonmar at microsoft.com
Fri Jan 7 05:23:01 EST 2005


On 07 January 2005 07:34, Isaac Jones wrote:

> ijones      2005/01/06 23:33:35 PST
> 
>   Modified files:
>     libraries/Cabal/Distribution/Simple Build.hs
>   Log:
>   fixed case where two main modules are in the same directory
> 
>   It's pretty common to have a situation where two modules with
>   different filenames are both named Main.  If they're in the same
>   directory, and we use the -odir and -hidir flags, ghc --make uses
>   the Main.o produced from the first build to link the 2nd!
> 
>   I added a pretty tricky test case for this, after it was reported by
>   Ganes Sittampalam while trying to build the HaXmL executables.
> 
>   I fixed it today by adding the executable name to the -odir and
>   -hidir paths, to make sure that they don't use the same Main.o...
>   this is a bit inefficient, though, because I'm pretty sure that
>   means it will rebuild any bits of the library it depends on for
> each executable. 
> 
>   Any objections to this?

No objections, but I think a better way would be to build the package
first, install it into a local package.conf and then build the
executables against the package.  

Cheers,
	Simon


More information about the Cvs-libraries mailing list