building, rebuilding, problems, ALUT,..

Claus Reinke claus.reinke at talk21.com
Thu Apr 19 08:52:25 EDT 2007


>> 1) If Cabal find the dependencies aren't satisfied then it puts
>>   "buildable: False" somewhere and exits successfully. I quite like
>>   this from a consistency point of view (it's what happens when
>>   ./configure decides that the package is unbuildable).
> 
> this is also what Cabal setup already does, eg, for the OpenAL binding, when 
> no OpenAL installation is found, so i don't understand why the setup behaviour
> differs when ALUT cannot find an OpenAL binding?

i couldn't find any hook to tune what setup configure does on failure, the call
to die seems hardcoded. using confHook to wrap configure and catch the 
ExitFailure exception seems like a hack, but got me somewhat further:

    $ darcs whatsnew
    plink: unknown option "-O"
    {
    hunk ./Setup.hs 6
    +import Distribution.Simple.Configure(configure)
    hunk ./Setup.hs 11
    +import qualified Control.Exception as CE (catch)
    +import System.Exit
    hunk ./Setup.hs 19
    +                  confHook = \pd cf->CE.catch (configure pd cf) noBuild,
    hunk ./Setup.hs 23
    +          where noBuild e = do writeHookedBuildInfo "ALUT.buildinfo" $
    +                                   (Just emptyBuildInfo{buildable=False},[])
    +                               exitWith (ExitSuccess)
    +                               return undefined
    }

now, make falls over in setup haddock. noBuild could write a dummy 
.setup-config, i guess, but perhap setup haddock should be wrapped in 
ifBuildable instead?

claus

---------------------
    cd OpenAL && setup/Setup haddock
    Reading parameters from c:\fptools\ghc\libraries\OpenAL\OpenAL.buildinfo
    
    Running Haddock for OpenAL-1.3...
    
    cd ALUT && setup/Setup haddock
    Reading parameters from c:\fptools\ghc\libraries\ALUT\ALUT.buildinfo
    
    Setup.exe: error reading ./.setup-config; run "setup configure" command?
    
    
    
    make[1]: *** [doc.library.ALUT] Error 1
    make[1]: Leaving directory `/cygdrive/c/fptools/ghc/libraries'
    make: *** [stage1] Error 2



More information about the Cvs-ghc mailing list