noinst executables?

Isaac Jones ijones at syntaxpolice.org
Thu Aug 24 19:06:40 EDT 2006


Conrad Parker <conrad at metadecks.org> writes:

> Hi,
>
> I'm using HUnit with Cabal: specifying test programs to be built and then
> run with 'runTests'.
>
> However, the test programs are marked as normal executables, and hence
> are installed by ./Setup.hs install. This isn't necessary, and clutters the
> installation; is there any way yet to mark executable targets as "not for
> installation" ("noinst" in GNU autotools terms)?

There is a way to do this.  There's a field in buildinfo called
"buildable".  You can generate a .buildinfo file during the configure
stage and if you don't want to install that executable, mark it as not
buildable.  See the docs for more info.

Another way to do this is to break it into two packages, hunit and
hunit-examples, and then:

% cabal-install hunit-examples

should install hunit and hunit-examples.  Any help in developing
cabal-install would be much appreciated.

peace,

  isaac


More information about the cabal-devel mailing list