cabal sdist doesn't include c headers
chris.casinghino at gmail.com
Sat Jan 2 17:40:57 EST 2010
Thanks for the reply. I did see this field in the documentation, but
I don't want the header file to be installed on the user's computer -
it's only for internal use. I need it to show up in the sdist tarball
because it's used for building the package.
On Sat, Jan 2, 2010 at 5:29 PM, Gwern Branwen <gwern0 at gmail.com> wrote:
> On Sat, Jan 2, 2010 at 4:54 PM, Chris Casinghino
> <chris.casinghino at gmail.com> wrote:
>> Hi all,
>> I have a cabal package which includes some C code. In the library
>> description I have the two fields:
>> include-dirs: contrib/libpuz/include
>> includes: contrib/libpuz/include/puz.h
>> But the file contrib/libpuz/include/puz.h is missing from the tarball
>> generated by running "cabal sdist". There are C sources (mentioned
>> using a "c-sources" line) which depend on this header.
>> I'm not sure if this is a bug or the desired behavior. What is the
>> recommended way to get this file into the sdist tarball? For now,
>> I've added the header to the "extra-source-files" field. This works
>> cabal --version reports:
>> cabal-install version 0.6.2
>> using version 188.8.131.52 of the Cabal library
>> Thanks for your help!
>> --Chris Casinghino
> Perhaps http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.html#pkg-descr
> "install-includes: filename list
> A list of header files from this package to be installed into
> $libdir/includes when the package is installed. Files listed in
> install-includes: should be found in relative to the top of the source
> tree or relative to one of the directories listed in include-dirs.
> install-includes is typically used to name header files that
> contain prototypes for foreign imports used in Haskell code in this
> package, for which the C implementations are also provided with the
> package. Note that to include them when compiling the package itself,
> they need to be listed in the includes: field as well."
More information about the Libraries