cvs commit: fptools/libraries/Cabal/Distribution/Simple Build.hs
ross at soi.city.ac.uk
ross at soi.city.ac.uk
Sun Jan 9 09:06:04 EST 2005
On Sat, Jan 08, 2005 at 02:05:32PM -0800, Isaac Jones wrote:
> "Simon Marlow" <simonmar at microsoft.com> writes:
>
> > 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.
>
> This is a little tricky for a few reasons... the library might depend
> on post-install scripts to work, or may not work in-place at all; it
> may require that it's installed at the configured location.
>
> We also will need to build the temporary package.conf file and cause
> the build step to use that as well as the localPackageConfig file. And
> all this should only happen if the executable has a build-depend on
> the library itself...
There's really no way to specify such a dependency now, as currently
build-depends is a relationship between package components (libraries
and individual executables) and packages. And yet this is a really
common case.
> For now, I just added a (possibly controversial) patch that allows the
> executables to peak into the library's hs-source-dir for modules while
> building and preprocessing. It wasn't actually possible before to
> build an executable that depended on a library that had its own
> hs-source-dir separate from the executable's hs-source-dir.
Are you proposing that the other-modules list for the executable
would include the library modules it uses?
I think a simple external picture would be:
- the executables of a package implicitly depend on the exposed part
of the library of the package (if any).
- build-depends is a relationship between packages.
A bit more to implement, as you say, but I think it would be worth it.
More information about the Cvs-libraries
mailing list