Matthias Kilian wrote:

I'm currently trying to bring back HC bootstrapping, and I'd some
kind of success, but only with really horrible hacks on
libraries/Makefile.local, the Cabal Makefile template, some bits
in mk, and libraries/Makefile itself. FYI the current state is that the
HC build starts well for base, old-time, directory and some other
libraries, but fails on unix, since it has old-time as transitive
dependency (via directory) and doesn't find HsTime.h[1].

Anyway, what I currently need is some way to store transitive
dependency information in some files and include those files in the
HC file bundle. At the moment, my best guess is to add a special
target to libraries/Makefile (or to the toplevel Makefile) that
will do the job using ghc-pkg-inplace (after the stage1 build),
probably with a little bit sed(1), awk(1) and/or tsort(1) magic.

If anyone has a better idea, please let me know. Hacking a little
bit on Cabal may an option, too.
>
The other problem I have is that I'm for now trying to use the
GNUmakefiles created by Cabal. I guess, the whole point of introducing
them actually was to make boostrapping from HC files possible.
However, after all it seems that plugging HC bootstrapping into the
current GNUmakefile stuff makes things even more complicated. So,
is there any other reason for building the libraries via the generated
GNUmakefiles? If not, I'd be happy to just build the libraries
directly with Cabal (in the non-HC-bootstrapping case) and do the
HC-bootstrapping separately. This would allow to simplify
libraries/Makefile a lot, IMHO.

If using the generated Makefiles is too hard for bootstrapping, then by all means build an alternative solution using hand-written Makefiles or whatever.

The reasons 'setup makefile' was introduced was not primarily for bootstrapping, although that was certainly one of the considerations. The other reasons are

 - parallel make (make -j)

 - when developing, we often want finer control over the build, for example
   building a single module with some extra options, and Cabal doesn't give
   us that (yet)

 - ghc --make often has higher memory requirements than individual
   compilations. (this isn't as important as the other two)

If/when Cabal gets its own dependency framework these reasons will disapppear, and if we no longer need 'setup makefile' for bootstrapping then it can go away completely. I'm sure the Cabal maintainers will not be sad to see it go :-)

Summary:

- I need a simple way to get transitive inter-library dependencies
  that'll be included in the HC file bundle.

I don't have a good enough grasp of the details to suggest a good solution here, I'm afraid.

Cheers,
        Simon


_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to