Using Haddock 2.0 to build GHC libraries
simonmarhaskell at gmail.com
Fri Oct 26 08:31:17 EDT 2007
Duncan Coutts wrote:
> On Fri, 2007-10-26 at 09:07 +0100, Simon Marlow wrote:
>> I suspect all you need to do is add
>> $(addprefix --ghc-option=,$(GhcLibHcOpts) $(SRC_HC_OPTS))
>> to the 'setup haddock' command line. That is, as long as --ghc-option is
>> accepted by Cabal's haddock command, if not we'll need to add it for
>> Haddock 2.0.
> That doesn't seem like the right approach to me. We should not need to
> pass in extra stuff to cabal haddock. It should just work. Cabal already
> knows that it's using haddock-2.0 and adjusts the commands line args it
> uses. We just need to adjust them so they're right and do similarly in
> the makefile that Cabal generates. I think they're already right in the
> normal way Cabal calls haddock, they just need to be done the same in
> the makefile way.
This is specific to the GHC build system. There are flags defined in
build.mk that are local to the build, and have to be plumbed through to
Cabal. We don't want to have to reconfigure every time these flags change,
so they're passed to setup when we invoke it.
More information about the Cvs-ghc