Rake (software)

From Wikipedia, the free encyclopedia

Jump to: navigation, search
Rake
Developed by Jim Weirich
Latest release 0.8.2 / 2008-09-09; 28 days ago
OS cross-platform
Type Software development tools
License MIT License
Website http://rake.rubyforge.org

Rake is a software build tool. It is similar to SCons and make, but has a number of differences. The tool is written in the Ruby programming language and the Rakefiles (equivalent of Makefiles in make) use Ruby syntax. It was originated by Jim Weirich.

Rake uses Ruby's anonymous function blocks to define various tasks, allowing the use of the Ruby syntax. There's a library of common tasks available, for example, functions to do common file-manipulation tasks and a library to remove compiled files (the "clean" task). Like Make, Rake can also synthesize tasks based on patterns (for example, automatically building a file compilation task based on filename patterns). Rake is now part of the standard library from Ruby version 1.9.

[edit] Example

Below is an example of a simple Rake script to build a C HelloWorld program.

  file 'hello.o' => ['hello.c'] do
    sh 'cc -c -o hello.o hello.c'
  end
  file 'hello' => ['hello.o'] do
    sh 'cc -o hello hello.o'
  end

[edit] See also

[edit] External links

Personal tools