-pgmc/a/l default options, other ideas
Simon Marlow
simonmarhaskell at gmail.com
Mon Jan 8 08:47:17 EST 2007
Peter Tanski wrote:
>> The problem is that we want to write Cabal packages that work both
>> with Windows and Linux, so there should be a way to have both
>> flavours of options. Eg.
>>
>> foo.cabal:
>> ...
>> cc-options: -DENABLE_WOOZLES
>> cl-options: /D:ENABLE_WOOZLES
>>
>> If you're forced to choose a ccflavour up front, you can't do this.
>
>
> Good point. There really should be both cc-options/cl-options and cc-
> flavour; Cabal should check for consistency (i.e., cc-options with cc-
> flavour = cl --> error).
hmm, I still don't see why you would want to specify a cc-flavour in a package
description. Shouldn't the package be independent of which kind of C compiler
is being used by the back end?
>> On the other hand, it's too much to expect everyone writing packages
>> to come up with all the different flavours of C compiler options, so
>> perhaps there should be automatic translation... ewww. But most
>> packages don't have any cc-options, so it's not so bad.
>
> The Cabal 'configure' step should handle the automatic translation...
> This is part of the problem for Win-GHC, since Cabal does not itself
> support Windows (it is dependent on the 'make' system).
Cabal supports Windows just fine! Cabal doesn't depend on make, unless you ask
it to. The default "simple" build system in Cabal doesn't use make at all, it
invokes all the build commands directly.
Cheers,
Simon
More information about the Cvs-ghc
mailing list