Rake (Software)
Rake ( German: " rake " ) is a software task management and build management tool that primarily use programmers that develop in the Ruby programming language. With Rake tasks can be defined and dependencies are described. The tasks can be grouped into namespaces.
Rake is similar to SCons and make, has compared to these but also some crucial differences. The tool is written in Ruby and the Rakefiles (equivalent to Makefile from make) use Ruby syntax. The original author was Jim Weirich ( 1956-2014 ).
Rake uses Ruby's anonymous function block to define various tasks, which enables the use of ruby syntax. It has a library of frequently used tasks, such as functionality for typical file manipulation tasks and a library for the cleaning of the compiled files (clean - task). Similar to make Rake tasks can also be synthesized on the basis of patterns, for example, a Compilations task of patterns to produce for file name extensions. Rake is now a standard part of Ruby 1.9.
Examples
Here is a simple Rakefile to build a Hello World program developed in the C programming language as an example:
File ' hello.o ' => [' hello.c '] do sh 'cc -c hello.c -o hello.o ' end file ' hello ' => [' hello.o '] do sh 'cc -o hello hello.o ' end The next example shows the use of a simple recipe:
Namespace: cake do desc 'make pancakes ' task: pancake => [: flour, : milk, : egg, : baking_powder ] do puts " sizzle " end task: butter do puts " cut 3 tablespoons of butter into tiny squares " end task: flour =>: butter do puts " Use hands to knead butter into squares 1 {{ frac | 1 | 2} } cup flour" end task: milk do puts " add 1 {{ frac | 1 | 4} } cup milk" end task: egg do puts " add one egg" end task: baking_powder do puts " add 3 { { frac | 1 | 2} } teaspoons baking powder" end end see also
- Make
- GNU Make
- Apache Maven
- Apache Ant
- A-A -P
- SCons