A make-like build utility for Ruby. https://github.com/ruby/rake
Go to file
Hiroshi SHIBATA 30fbf4e05b
Merge pull request #444 from deivid-rodriguez/rubocop
Correct RuboCop offenses
2022-08-16 09:06:14 +09:00
.github Install minitest-5.15.0 on GHA 2022-07-19 14:34:46 +09:00
bin Merge pull request #425 from tnir/tnir/remove-bin-bundler 2022-05-10 19:55:11 +09:00
doc Specify frozen_string_literal: true 2017-06-20 09:26:16 +09:00
exe prefer to use double quotes string literals 2016-09-05 17:25:29 +09:00
lib Merge pull request #147 from MarkDBlackwell/mdb/sh-full-echo-on-error 2022-08-13 07:00:24 +09:00
test Correct RuboCop offenses 2022-08-15 10:52:17 +02:00
.gitignore Ignore rdoc tags cache directory 2014-03-12 14:27:13 -07:00
.rubocop.yml Add RuboCop job to Actions 2022-06-14 02:38:11 +00:00
CONTRIBUTING.rdoc docs: update CONTRIBUTING 2022-06-02 06:18:06 +00:00
Gemfile Lock minitest-5.15.0 for Ruby 2.2 2022-07-19 14:31:39 +09:00
History.rdoc Bump up Rake-13.0.6 2021-07-09 11:51:50 +09:00
MIT-LICENSE Remove copyright dates from license 2014-04-24 14:56:05 -07:00
README.rdoc Add credit for maintenance in Rake 12/13 2022-07-25 00:43:34 +00:00
Rakefile prefer to use %x literal instead of back-tick 2018-01-07 11:44:18 +09:00
rake.gemspec Use require_relative to specify release version 2021-07-06 15:38:04 +09:00

README.rdoc

= RAKE -- Ruby Make

home :: https://github.com/ruby/rake
bugs :: https://github.com/ruby/rake/issues
docs :: https://ruby.github.io/rake

== Description

Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
specified in standard Ruby syntax.

Rake has the following features:

* Rakefiles (rake's version of Makefiles) are completely defined in
  standard Ruby syntax.  No XML files to edit.  No quirky Makefile
  syntax to worry about (is that a tab or a space?)

* Users can specify tasks with prerequisites.

* Rake supports rule patterns to synthesize implicit tasks.

* Flexible FileLists that act like arrays but know about manipulating
  file names and paths.

* A library of prepackaged tasks to make building rakefiles easier. For example,
  tasks for building tarballs. (Formerly
  tasks for building RDoc, Gems, and publishing to FTP were included in rake but they're now
  available in RDoc, RubyGems, and rake-contrib respectively.)

* Supports parallel execution of tasks.

== Installation

=== Gem Installation

Download and install rake with the following.

  gem install rake

== Usage

=== Simple Example

First, you must write a "Rakefile" file which contains the build rules. Here's
a simple example:

  task default: %w[test]

  task :test do
    ruby "test/unittest.rb"
  end

This Rakefile has two tasks:

* A task named "test", which -- upon invocation -- will run a unit test file
  in Ruby.
* A task named "default". This task does nothing by itself, but it has exactly
  one dependency, namely the "test" task. Invoking the "default" task will
  cause Rake to invoke the "test" task as well.

Running the "rake" command without any options will cause it to run the
"default" task in the Rakefile:

  % ls
  Rakefile     test/
  % rake
  (in /home/some_user/Projects/rake)
  ruby test/unittest.rb
  ....unit test output here...

Type "rake --help" for all available options.

== Resources

=== Rake Information

* {Rake command-line}[link:doc/command_line_usage.rdoc]
* {Writing Rakefiles}[link:doc/rakefile.rdoc]
* The original {Rake announcement}[link:doc/rational.rdoc]
* Rake {glossary}[link:doc/glossary.rdoc]

=== Presentations and Articles about Rake

* Avdi Grimm's rake series:
  1. {Rake Basics}[https://avdi.codes/rake-part-1-basics/]
  2. {Rake File Lists}[https://avdi.codes/rake-part-2-file-lists-2/]
  3. {Rake Rules}[https://avdi.codes/rake-part-3-rules/]
  4. {Rake Pathmap}[https://avdi.codes/rake-part-4-pathmap/]
  5. {File Operations}[https://avdi.codes/rake-part-5-file-operations/]
  6. {Clean and Clobber}[https://avdi.codes/rake-part-6-clean-and-clobber/]
  7. {MultiTask}[https://avdi.codes/rake-part-7-multitask/]
* {Jim Weirich's 2003 RubyConf presentation}[https://web.archive.org/web/20140221123354/http://onestepback.org/articles/buildingwithrake/]
* Martin Fowler's article on Rake: https://martinfowler.com/articles/rake.html

== Other Make Re-envisionings ...

Rake is a late entry in the make replacement field.  Here are links to
other projects with similar (and not so similar) goals.

* https://directory.fsf.org/wiki/Bras -- Bras, one of earliest
  implementations of "make in a scripting language".
* http://www.a-a-p.org -- Make in Python
* https://ant.apache.org -- The Ant project
* https://search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System
* https://www.rubydoc.info/gems/rant/0.5.7/frames -- Rant, another Ruby make tool.

== Credits

[<b>Jim Weirich</b>] Who originally created Rake.

[<b>Ryan Dlugosz</b>] For the initial conversation that sparked Rake.

[<b>Nobuyoshi Nakada <nobu@ruby-lang.org></b>] For the initial patch for rule support.

[<b>Tilman Sauerbeck <tilman@code-monkey.de></b>] For the recursive rule patch.

[<b>Eric Hodel</b>] For aid in maintaining rake.

[<b>Hiroshi SHIBATA</b>] Maintainer of Rake 10 and later

== License

Rake is available under an MIT-style license.

:include: MIT-LICENSE

---

= Other stuff

Author::   Jim Weirich <jim.weirich@gmail.com>
Requires:: Ruby 2.0.0 or later
License::  Copyright Jim Weirich.
           Released under an MIT-style license.  See the MIT-LICENSE
           file included in the distribution.

== Warranty

This software is provided "as is" and without any express or implied
warranties, including, without limitation, the implied warranties of
merchantability and fitness for a particular purpose.

== Historical

Rake was originally created by Jim Weirich, who unfortunately passed away in
February 2014. This repository was originally hosted at
{github.com/jimweirich/rake}[https://github.com/jimweirich/rake/], however
with his passing, has been moved to {ruby/rake}[https://github.com/ruby/rake].

You can view Jim's last commit here:
https://github.com/jimweirich/rake/tree/336559f28f55bce418e2ebcc0a57548dcbac4025

You can {read more about Jim}[https://en.wikipedia.org/wiki/Jim_Weirich] at Wikipedia.

Thank you for this great tool, Jim. We'll remember you.