updated at Sat Jan 10 10:13:57 JST 2009
You can use suffix rule by 'rule'.
> cat hello.c
#include <stdio.h>
int
main (int argc, char *argv[])
{
printf( "Hello, world!\n" );
return 0;
}
> cat Hakefile
import Development.Hake
import Development.Hake.FunSet
main = hake [
rule "" ".c" $ \t (s:_) -> [ "cc -o " ++ t ++ " " ++ s ]
]
You can use FunSetRaw if you like.
> cat Hakefile
import Development.Hake
import Development.Hake.FunSetRaw
main = hake [
rule "" ".c" $ \t (s:_) -> [ [ "cc", "-o", t, s ] ]
]
> hake hello
cc -o hello hello.c
> ./hello
Hello, world!