forked from FakeBuild/Xake
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Oleg edited this page Apr 3, 2017
·
12 revisions
Xake is MAKE clone, with an F# programming language as script language. Xake utilizes full power of the F# language to provide clean syntax:
#r @"Xake.Core.dll"
open Xake
open Xake.Tasks.Dotnet
open Xake.Tasks.File
do xakeScript {
rules [
"main" <== ["hw.exe"]
"hw.dll" ..> csc {src !! "util.cs"}
"hw.exe" ..> csc {
target TargetType.Exe
src !! "hw.cs"
ref !! "hw.dll"
}
"(name:*).exe" ..> recipe {
let! name = getRuleMatch "name"
do! csc {src (!!(name + ".cs") ++ "ver.cs")}
}
"ver.cs" ..> recipe {
let! envver = getEnv "VER"
let ver = envver |> function | Some x -> x | _ -> "v0.1"
do! writeText (sprintf """static class App {const string Ver = "%s";}""" ver)
}
]
}Unlike many other tools it was made with declarative approach in mind. Such approach allows to internally track dependencies which in turn brings extra benefits such as:
- incremental build (only rebuild affected part)
- estimate build time (progress indicator)
- execute tasks in parallel
>> Next >> Introduction