haskell/cabal — pull request #997 by ttuegel (2012-08-10 22:58:45+00:00)
Title: 'cabal build' implies 'cabal configure'; 'cabal test' and 'cabal bench' imply 'cabal build'

These commits improve the user interface of the cabal-install tool by automatically running 'configure' before 'build' as necessary and by running `build` before `test` and `bench`. The end result is that `cabal unpack foo; cd foo; cabal test` very probably does what the user expects.

The commits for running `build` before `test` and `bench` are largely plumbing. The first commit, which runs `configure` before `build`, has a bit of convoluted logic to decide what `ConfigFlags` to use when reconfiguring.