Including object files in Cabal packages

C Rodrigues red5_2 at hotmail.com
Mon Jun 15 10:24:34 EDT 2009


Thanks for your reply, Duncan.

>> Where should the list of object files go? I can add it as a new field
>> of BuildInfo, or make it another parameter of build.
>
> How about making a custom Setup.hs that calls the makefile to generate
> the .o files and then do something like adding them into the .a library.
> Perhaps there's some API change that we could do to make this easier.
Actually, better documentation would be very useful.  The current User'sGuide provides virtually no help on custom packages.  It took meseveral hours of digging around in the Haddock docs and inspecting thepackage configuration in ghci to discover that there's a way to get the nameof the package library file.  When I wrote my last message, I already hada custom Setup.hs that runs configure/make, and I didn't thinkCabal had a function to do that.
buildDir lbi  mkLibName (package $ localPackageDescr lbi)
> I don't think adding a field in the build info makes a lot of sense,
> since normal packages would not be able to use it.

Currently, Cabal has no interface for running compilers for otherlanguages, so only custom packages would be producing .o files.

_________________________________________________________________
Insert movie times and more without leaving Hotmail®. 
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009


More information about the cabal-devel mailing list