cvs commit: fptools/libraries/Cabal/Distribution Simple.hs
fptools/libraries/Cabal/tests
ModuleTest.hs fptools/libraries/Cabal/tests/withHooks Setup.lhs
Isaac Jones
ijones at galois.com
Thu Sep 8 02:15:38 EDT 2005
ijones 2005/09/07 23:15:38 PDT
Modified files:
libraries/Cabal/Distribution Simple.hs
libraries/Cabal/tests ModuleTest.hs
libraries/Cabal/tests/withHooks Setup.lhs
Log:
First stab at command-hooks
That is, hooks to override basic behavior of configure, install, etc.
Basic use case for this is in over-riding the "install" behavior for
cgi-bin tools.
In addition to the existing hooks, that gives us:
confHook :: PackageDescription -> ConfigFlags -> IO LocalBuildInfo,
buildHook :: PackageDescription
-> LocalBuildInfo
-> Int -- verbose
-> [ PPSuffixHandler ]
-> IO (),
cleanHook :: PackageDescription -> LocalBuildInfo -> Int -> [PPSuffixHandler] -> IO (),
copyHook :: PackageDescription
-> LocalBuildInfo
-> (Maybe FilePath,Int) -- ^install-prefix, verbose
-> IO (),
instHook :: PackageDescription
-> LocalBuildInfo
-> Int -- verbose
-> Bool -- user install?
-> IO (),
sDistHook :: FilePath -- ^build prefix (temp dir)
-> FilePath -- ^TargetPrefix
-> Int -- ^verbose
-> Bool -- ^snapshot
-> [PPSuffixHandler] -- ^ extra preprocessors (includes suffixes)
-> PackageDescription
-> IO (),
regHook :: PackageDescription -> LocalBuildInfo -> RegisterFlags -> IO (),
unregHook :: PackageDescription -> LocalBuildInfo -> RegisterFlags -> IO (),
haddockHook :: PackageDescription -> LocalBuildInfo -> Int -> [PPSuffixHandler] -> IO (),
pfeHook :: PackageDescription -> LocalBuildInfo -> Int -> [PPSuffixHandler] -> IO ()
I don't really know if these types are good, but they are the types
needed by the "default" hooks which do the guts of the
Distribution.Simple work. I'm not happy with the handling of
LocalBuildInfo which you can't avoid generating at this point, because
all the post-hooks need it.
Revision Changes Path
1.79 +118 -19 fptools/libraries/Cabal/Distribution/Simple.hs
1.23 +3 -1 fptools/libraries/Cabal/tests/ModuleTest.hs
1.3 +18 -3 fptools/libraries/Cabal/tests/withHooks/Setup.lhs
More information about the Cvs-libraries
mailing list