Skip to content
Oleg edited this page May 15, 2018 · 12 revisions

About

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.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 |> Option.defaultValue "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

Clone this wiki locally