-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | make tool. ruby : rake = haskell : hake -- -- Like ruby's rake, hake have Hakefile which is Haskell source. -- -- And Hakefile is like rake's Rakefile, and make's Makefile. -- -- Hakefile is just Haskell source code, then you can use all Haskell -- features. -- --
-- import Development.Hake
-- hake_rules = [
--
-- dflt [ "greeting" ]
-- ,
-- file ( [ "greeting", "greeting.log" ], [ "hello.o", "good-bye.o" ] ,
-- [ "linker -o greeting hello.o good-bye.o" ] )
-- ,
-- rule ( ".o", ".sfx1",
-- \t s -> [ "compiler1 " ++ s ++ " -o " ++ t ] )
-- ,
-- rule ( ".o", ".sfx2",
-- \t s -> [ "compiler2 " ++ s ++ " -o " ++ t ] )
-- ,
-- task ( "clean" , [ "rm -f *.o greeting greeting.log" ] )
-- ,
-- mkfl ( "script.sh", [ "#!/bin/sh", "echo This is script", "echo made by Hakefile" ] )
-- ,
-- ruleSS ( "", ".o", \t s -> [ (".c", [ "gcc " ++ s ++ " -o " ++ t ] ) ,
-- (".cc", [ "g++ " ++ s ++ " -o " ++ t ] ) ] )
-- ,
-- rule ( ".o", ".c", \_ s -> [ "gcc -c " ++ s ] )
-- ,
-- rule ( ".o", ".cc", \_ s -> [ "g++ -c " ++ s ] )
-- ,
-- base ( [ (=="foo") ], const [ "foo.gen", "Hakefile" ], \t [s] -> [ \_ -> do
-- gen <- readFile s
-- writeFile t $ unlines $
-- [ "#!/bin/sh", "echo This is script" ] ++ lines gen
-- return ExitSuccess ] )
--
-- ]
--
-- main = hake hake_rules
--
@package hake
@version 0.7
module Development.Hake
type Rule = (Targets, Sources, Commands)
-- | The hake function take rules as argument and get target from
-- command line and make target.
hake :: [Rule] -> IO ()
hakeT :: [Rule] -> FilePath -> IO ()
hakefileIs :: FilePath -> [FilePath] -> IO ExitCode
base :: (Targets, Sources, String -> [String] -> [MadeFromList -> IO ExitCode]) -> Rule
file :: ([String], [String], [String]) -> Rule
task :: (String, [String]) -> Rule
rule :: (String, String, String -> String -> [String]) -> Rule
ruleSS :: (String, String, String -> String -> [(String, [String])]) -> Rule
dflt :: [String] -> Rule
mkfl :: (String, [String]) -> Rule
systemE :: String -> IO ExitCode
-- | The isSuffixOf function takes two lists and returns True
-- iff the first list is a suffix of the second. Both lists must be
-- finite.
isSuffixOf :: (Eq a) => [a] -> [a] -> Bool
changeSuffix :: String -> String -> String -> String
data ExitCode :: *
-- | indicates successful termination;
ExitSuccess :: ExitCode