-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A generic build tool -- -- Coadjute is a generic build tool, intended as an easier to use and -- more portable replacement for make. It's not tailored toward any -- particular language, and is not meant to replace tools which target a -- specific environment. -- -- Portability is striven towards in two ways: - You don't have to deal -- with the idiosyncrasies of many make implementations (well, people -- don't, but they call their GNU Make files makefiles instead of -- GNUmakefiles, which causes misunderstandings). - You have Haskell at -- your disposal, and are encouraged to use that whenever possible -- instead of system-specific binaries like the POSIX commands we all -- know and love. -- -- With support for: - Parallel task performing. - Advanced -- out-of-dateness detection: - Choice between timestamps and hashes. - -- Keeping track of what arguments have been passed. - Haskell! @package Coadjute @version 0.1.1 -- | Coadjute is a generic build tool, intended as an easier to use and -- more portable (in the sense that implementations don't differ) -- replacement for make. It's not tailored toward any particular -- language, and is not meant to replace tools which target a specific -- environment. -- -- An example of simple usage: -- --
--   import Coadjute
--   import System.Directory
--   
--   main = coadjute $ do
--      rule' "Copy foo from src to obj"
--            (\[s] t -> copyFile s t)
--            (sourceDatum' (("obj"++) . drop 3) ["src/foo"])
--   
-- -- By convention, this file should be called Adjutant.hs. -- -- Compiled and run, it would copy src/foo to obj/foo -- whenever src/foo is older than obj/foo. With -- -d or --use-db passed, it would hash (currently MD5) -- src/foo, using that instead of modification time data to -- decide whether to run the copyFile or not. module Coadjute -- | Coadjute is the main monad you'll be working in. You can use the -- rule family of functions to add rules whilst within this monad, -- and you can have a look at what arguments were given to you with -- getUserArgs. -- -- For your convenience, a MonadIO instance is provided. data Coadjute a coadjute :: Coadjute a -> IO a -- | A rule for building targets individually. rule :: String -> [String] -> ([Source] -> Target -> IO ()) -> [([Source], Target)] -> Coadjute () -- | A rule for building multiple targets at once. ruleM :: String -> [String] -> ([Source] -> [Target] -> IO ()) -> [([Source], [Target])] -> Coadjute () -- |
--   rule' = flip rule []
--   
rule' :: String -> ([Source] -> Target -> IO ()) -> [([Source], Target)] -> Coadjute () -- |
--   ruleM' = flip ruleM []
--   
ruleM' :: String -> ([Source] -> [Target] -> IO ()) -> [([Source], [Target])] -> Coadjute () -- | You should use this instead of System.Environment.getArgs, to -- let Coadjute handle its own command line arguments first. getUserArgs :: Coadjute [String] type Source = FilePath type Target = FilePath