Cabal with profiling

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Cabal with profiling

Iavor Diatchki
Hello,
I am sure this was asked before, but I could not find any answers...
How can I use Cabal to build a package that includes both normal and
profiling versions of my library for GHC?
I am thinking of something like:
runhaskell Setup.hs configure --ghc --with-profiling
  * remembers that we want profiling libraries)
runhaskell Setup.hs build
  * compile as usual
  * if 'with-profiling' compile again with some additional options,
(e.g., -prof etc)
and then proceed as usual.

-Iavor
_______________________________________________
Libraries mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Cabal with profiling

Duncan Coutts
On Thu, 2005-11-17 at 14:02 -0800, Iavor Diatchki wrote:
> Hello,
> I am sure this was asked before, but I could not find any answers...
> How can I use Cabal to build a package that includes both normal and
> profiling versions of my library for GHC?

$ runhaskell Setup.lhs configure --help

Usage: Setup.lhs configure [FLAGS]

Flags for configure:
  -h, -?   --help                          Show this help text
  -g       --ghc                           compile with GHC
  -n       --nhc                           compile with NHC
           --hugs                          compile with hugs

[snip]

  -p       --enable-library-profiling      Enable library profiling
           --disable-library-profiling     Disable library profiling
           --enable-executable-profiling   Enable executable profiling
           --disable-executable-profiling  Disable executable profiling

[snip]

Duncan

_______________________________________________
Libraries mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Cabal with profiling

Iavor Diatchki
Hi,
I take it I have to install a newer version of Cabal?   I'll try 1.1.3...
-Iavor

PS: Here is what my Cabal says:
runhaskell Setup.hs configure --help
Usage: Setup.hs configure [FLAGS]

Flags for configure:
  -h, -?   --help                Show this help text
  -v[n]    --verbose[=n]         Control verbosity (n is 0--5, normal
verbosity level is 1, -v alone is equivalent to -v3)
  -g       --ghc                 compile with GHC
  -n       --nhc                 compile with NHC
           --hugs                compile with hugs
  -w PATH  --with-compiler=PATH  give the path to a particular compiler
           --with-hc-pkg=PATH    give the path to the package tool
           --prefix=DIR          bake this prefix in preparation of installation
           --with-haddock=PATH   give the path to haddock
           --with-happy=PATH     give the path to happy
           --with-alex=PATH      give the path to alex
           --with-hsc2hs=PATH    give the path to hsc2hs
           --with-cpphs=PATH     give the path to cpphs
           --user                allow dependencies to be satisfied
from the user package database
           --global              (default) dependencies must be
satisfied from the global package database
  -b DIR   --builddir=DIR        directory to receive the built
package [dist/build]


On 11/17/05, Duncan Coutts <[hidden email]> wrote:

> On Thu, 2005-11-17 at 14:02 -0800, Iavor Diatchki wrote:
> > Hello,
> > I am sure this was asked before, but I could not find any answers...
> > How can I use Cabal to build a package that includes both normal and
> > profiling versions of my library for GHC?
>
> $ runhaskell Setup.lhs configure --help
>
> Usage: Setup.lhs configure [FLAGS]
>
> Flags for configure:
>   -h, -?   --help                          Show this help text
>   -g       --ghc                           compile with GHC
>   -n       --nhc                           compile with NHC
>            --hugs                          compile with hugs
>
> [snip]
>
>   -p       --enable-library-profiling      Enable library profiling
>            --disable-library-profiling     Disable library profiling
>            --enable-executable-profiling   Enable executable profiling
>            --disable-executable-profiling  Disable executable profiling
>
> [snip]
>
> Duncan
>
>
_______________________________________________
Libraries mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/libraries