
On Fri, 7 Jan 2011, Kathleen Fisher wrote:
Is it possible to have a directory with multiple cabal files, telling cabal which file to use for a given install request by passing in a flag, say something like:
cabal install -f pads.cabal or cabal install -f forest.cabal
In other words, something like the -f option in make.
I looked through the cabal documentation, but didn't see an option for specifying the cabal file to use. Did I just fail to see the proper flag? or does it not exist?
I think it does not exist.
If it doesn't, is that just because it hasn't been implemented, or is there a Good Reason?
If you tell what you are intending, then we can certainly find a solution using existing Cabal features. So far I could describe the things I wanted using Cabal flags. For instance I can choose the Hs-Source-Dirs depending on a flag. I can switch on and off building of an executable and its dependencies using a flag. There are other things that could be done with flags, but should not be done, e.g. providing different APIs depending on a flag. http://www.haskell.org/haskellwiki/Cabal/Developer-FAQ