Skip to content
Oleg edited this page May 16, 2018 · 10 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 "paket:
    nuget Xake ~> 1.1 prerelease
    nuget Xake.Dotnet ~> 1.1 prerelease //"

#if !FAKE
  #load ".fake/project-example.fsx/intellisense.fsx"
#endif

open Xake
open Xake.Tasks
open Xake.Dotnet

let srcPath = "project-example-src"

do xakeScript {
    rules [
        "main" <== ["out/hw.exe"]
        "out/hw.dll" ..> csc {src (!! "util.cs" @@ srcPath)}

        "out/hw.exe" ..> csc {
            target TargetType.Exe
            src (!! "hw.cs" ++ "ver.cs" @@ srcPath)
            ref !! "out/hw.dll"
        }

        srcPath </> "ver.cs" ..> recipe {
            let! envver = getVar "VER"
            let ver = envver |> Option.defaultValue "v0.1"
            do! trace Message "Updating version number to `%s`" ver
            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