Skip to content

Commit

Permalink
Don't make cabal-install into a library just yet
Browse files Browse the repository at this point in the history
At some point in the future we probably do want a library or two
but we should make that decision deliberately and think about the API
that we want to expose.

I understand the change was made not to expose a lib API but to avoid
compiling the modules twice for the test-suite. It is true that that's
annoying but we don't yet have support for private or "convenience"
libraries and installing it as an exposed lib is not what we want to do
at the moment.
  • Loading branch information
dcoutts committed Mar 15, 2013
1 parent 6dde345 commit 7597a17
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 24 deletions.
File renamed without changes.
70 changes: 46 additions & 24 deletions cabal-install/cabal-install.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ Flag old-directory
description: Use directory < 1.2 and old-time
default: False

Library
ghc-options: -Wall -fwarn-tabs
if arch(arm)
cc-options: -DCABAL_NO_THREADED
Exposed-Modules:
executable cabal
main-is: Main.hs
ghc-options: -Wall -fwarn-tabs
other-modules:
Distribution.Client.BuildReports.Anonymous
Distribution.Client.BuildReports.Storage
Distribution.Client.BuildReports.Types
Expand Down Expand Up @@ -109,7 +108,6 @@ Library
Distribution.Compat.FilePerms
Distribution.Compat.Semaphore
Distribution.Compat.Time
Other-Modules:
Paths_cabal_install

build-depends:
Expand Down Expand Up @@ -139,34 +137,58 @@ Library
cpp-options: -DWIN32
else
build-depends: unix >= 1.0 && < 2.7
c-sources: cbits/getnumcores.c

Executable cabal
Main-Is: Main.hs
hs-source-dirs: src
ghc-options: -Wall -fwarn-tabs
if !arch(arm)
if arch(arm)
cc-options: -DCABAL_NO_THREADED
else
ghc-options: -threaded
build-depends: base >= 4 && < 5,
Cabal >= 1.17.0 && < 1.18,
cabal-install >= 1.17.0 && < 1.18,
directory >= 1 && < 1.3,
filepath >= 1.0 && < 1.4

c-sources: cbits/getnumcores.c


Test-Suite unit-tests
type: exitcode-stdio-1.0
main-is: UnitTests.hs
hs-source-dirs: tests
hs-source-dirs: tests, .
ghc-options: -Wall -fwarn-tabs
other-modules:
UnitTests.Distribution.Client.Targets
UnitTests.Distribution.Client.Dependency.Modular.PSQ
UnitTests.Distribution.Client.Sandbox
build-depends:
base,
array,
bytestring,
Cabal,
containers,
mtl,
network,
pretty,
process,
directory,
filepath,
stm,
time,
network,
HTTP,
zlib,

test-framework,
test-framework-hunit,
test-framework-quickcheck2,
HUnit,
QuickCheck (>= 2.5),
cabal-install,
Cabal
ghc-options: -Wall -fwarn-tabs
if !arch(arm)
ghc-options: -threaded
QuickCheck >= 2.5

if flag(old-directory)
build-depends: old-time

if os(windows)
build-depends: Win32
cpp-options: -DWIN32
else
build-depends: unix

if arch(arm)
cc-options: -DCABAL_NO_THREADED
else
ghc-options: -threaded

0 comments on commit 7597a17

Please sign in to comment.