Using --make with -odir and hierarchical modules

Simon Marlow simonmar@microsoft.com
Mon, 20 Jan 2003 15:20:23 -0000


> Martin Norb=E4ck <d95mback@dtek.chalmers.se> writes:
>=20
> > The GHC manual needs to specify what happens when you use -odir and
> > hierarchical modules with --make.
>=20
> It may be of interest to note that hmake currently uses=20
> solution 2 below.
>=20
> > Solution 2: files put in -odir are put in directories=20
> (files will end up
> > in Program/output/Bar/Module.o and Program/output/Foo/Module.o)
> > This is also a slight change in semantics, since files are put in
> > directories. May affect Makefiles that does "ar output/*.o"=20
> or similar.

And this is also what the current CVS version of GHC does.  Note that =
you need to create the directories if they don't exist (GHC won't do it =
for you).

Please also see =
http://www.haskell.org/pipermail/glasgow-haskell-users/2002-December/0045=
69.html, which contains a specification of GHC's current search =
strategy.

Cheers,
	Simon