hake: make tool. ruby : rake = haskell : hake

[ development, library, program ] [ Propose Tags ]

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.

I have changed Hakefile syntax. If you want to use old Hakefile, put 'import Development.Hake.OldFunSet'.

import Development.Hake
import Development.Hake.FunSet
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", "hello.o", "good-by.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
Versions 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.9.5, 0.9.9, 1.0, 1.1, 1.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8.1
Dependencies base, directory, filepath, mtl, old-time, process, regexpr (>=0.3), yjtools (>=0.6) [details]
License LicenseRef-GPL
Author Yoshikuni Jujo
Maintainer Yoshikuni Jujo <PAF01143@nifty.ne.jp>
Category Development
Home page http://homepage3.nifty.com/salamander/second/projects/hake/index.xhtml
Uploaded by YoshikuniJujo at Wed Nov 5 12:32:21 UTC 2008
Distributions NixOS:1.3.8.1
Executables hake
Downloads 7281 total (168 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees