Hi,

On Fri, Nov 21, 2008 at 02:58:12AM +0100, Matthias Kilian wrote:
> 
> On Thu, Nov 20, 2008 at 04:58:44PM +0000, Ian Lynagh wrote:
> > We've filled out the new build system design plan with some details:
> >     http://hackage.haskell.org/trac/ghc/wiki/Design/BuildSystem
> > Please have a look and if you forsee any problems, or have any
> > suggestions of how things could be done better, let us know.
> 
> Yes, there's one problem: The makefiles for libraries generated by
> ghc-cabal shouldn't contain anything except variable assignments
> and dependency rules (and possibly a .include), but no rules with
> shell commands. For example, in the generated Makefile mentioned
> in the design document, there's a rule
> 
>       $(LIBRARY_foo_v_A_FILE): inplace/bin/ghc-pkg \
>                                libraries/foo/dist/inplace-config \
>                                $(LIBRARY_foo_v_O_FILES) \
>                                $(LIBRARY_bar_v_A_FILE)
>               ghc $(LIBRARY_foo_v_O_FILES) -package bar -o $@
>               inplace/bin/ghc-cabal --in-dir libraries/foo register
> 
> What happens if you want to tweak this (generated) rule? You've to
> change and rebuild ghc-cabal.

Thanks for the feedback! We actually plan to use $(eval ...) to generate
those rules, as we talk about a couple of bullet points later
(sorry for the gap between them; there are so many interconnected things
going on that it's hard to find a good order to put the bullet points in
a list):

    There are two ways that we could handle the generation. We could
    generate the complete rules, as above, but that makes them harder to
    edit (as you'd actually have to edit some Haskell source that
    generates them). Alternatively, we could generate them with a little
    $(eval ...) in the makefile. the downside of that is that it
    requires make >= 3.80, which msys doesn't come with. However, it
    looks like it is easy to upgrade an msys installation, so that's the
    route that we plan to take.

(actually, the rebuilding shouldn't be as painful as you might think,
because having changed the ghc-cabal source make should rebuild
ghc-cabal and regenerate the makefiles for you automatically. But we
plan to go with eval instead anyway).


Thanks
Ian

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

Reply via email to