extending --make

Simon Marlow simonmar@microsoft.com
Thu, 31 May 2001 13:53:41 +0100

> I have a whish for the GHC `making' possibilities.
> ghc-5*  -package-name --make=20
> is said trying to replace Makefile. But it is half-successful.
> * First, it needs  -ohi  option working=20
>   (to move .hi -s to chosen directory).

I've added a -hidir option which should do the right thing.

> * Second, could GHC provide options for creating libraries,=20
>   adding to library?

This might make it easier to build a library from Haskell files, but it
would also be duplicating functionality that is already available.  I
don't see it as a priority, I'm afraid.

> Explanation.
> With  ghc-4,  I used Makefile and  -odir, -ohi  options to provide
> the project installation.=20
> Makefile  contained=20
>   (1)
>   the project directory tree description,
>   variables holding the list of names for the  .hs, .hi, .o  files,=20
>   rules to convert  .hs --> .o,  and such.
> Also it contained the library creation part:
>   (2)
>   foo:	$(objectFiles)
>         ar -q   export/libHSfoo.a  `ls export/*.o`
>         ranlib  export/libHSfoo.a
>         rm -f   `ls export/*.o`

So you can use the same makefile, but you can replace part (1) with a
single rule which uses --make.