Configurations proposal

Brian Smith brianlsmith at gmail.com
Wed Oct 25 14:46:37 EDT 2006


On 10/25/06, Brian Smith <brianlsmith at gmail.com> wrote:
>
>
>      Configuration: flag(debug)
>      Name: bar-debug
>      Build-depends: foo-debug || foo
>
>      Configuration: !flag(debug)
>      Name: bar
>      Build-depends: foo
>

After sending this I realized I made a mistake. Try this:
     Flag: debug
     Default: False

     Flag: foo-debug-available
     Default: available(foo-debug)

     Configuration: flag(debug) && foo-debug-available
     Name: bar-debug
     Build-depends: foo-debug
     Cpp-Options: -DDEBUG

     Configuration: flag(debug) && !foo-debug-available
     Name: bar-debug
     Build-depends: foo
     Cpp-Options: -DDEBUG

     Configuration: !flag(debug)
     Name: bar
     Build-depends: foo

Unfortunately, this way of requesting "using the debug version if available"
does not scale.

- Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/cabal-devel/attachments/20061025/a891d5fb/attachment.htm


More information about the cabal-devel mailing list