| 1 |
= DRAKE -- Distributed Rake |
| 2 |
|
| 3 |
A branch of Rake supporting automatic parallelizing of tasks. |
| 4 |
|
| 5 |
== Synopsis |
| 6 |
|
| 7 |
Run up to three tasks in parallel: |
| 8 |
|
| 9 |
% drake -j3 |
| 10 |
|
| 11 |
Run as many tasks in parallel as the dependencies allow: |
| 12 |
|
| 13 |
% drake -j |
| 14 |
|
| 15 |
== Installation |
| 16 |
|
| 17 |
% gem install drake |
| 18 |
|
| 19 |
== Notes |
| 20 |
|
| 21 |
Drake is fully compatible with Rake. The code base is identical to |
| 22 |
that of Rake except for the addition of the -j option. |
| 23 |
|
| 24 |
For the purposes of this documentation, the 'rake' and 'drake' |
| 25 |
commands are interchangeable. The drake gem will install the drake |
| 26 |
executable. On your system you may alias or link drake to rake if |
| 27 |
desired. |
| 28 |
|
| 29 |
For more on parallelization with -j, see |
| 30 |
parallel.rdoc[http://quix.github.com/rake/files/doc/parallel_rdoc.html]. |
| 31 |
|
| 32 |
== Links |
| 33 |
|
| 34 |
* Home: http://quix.github.com/rake |
| 35 |
* Feature Requests, Bug Reports: http://github.com/quix/rake/issues |
| 36 |
* Repository: http://github.com/quix/rake |
| 37 |
|
| 38 |
== Author |
| 39 |
|
| 40 |
* James M. Lawrence <[email protected]> |
| 41 |
|
| 42 |
== License |
| 43 |
|
| 44 |
Copyright (c) 2003-2010 Jim Weirich |
| 45 |
|
| 46 |
Copyright (c) 2008-2011 James M. Lawrence |
| 47 |
|
| 48 |
Permission is hereby granted, free of charge, to any person obtaining |
| 49 |
a copy of this software and associated documentation files (the |
| 50 |
"Software"), to deal in the Software without restriction, including |
| 51 |
without limitation the rights to use, copy, modify, merge, publish, |
| 52 |
distribute, sublicense, and/or sell copies of the Software, and to |
| 53 |
permit persons to whom the Software is furnished to do so, subject to |
| 54 |
the following conditions: |
| 55 |
|
| 56 |
The above copyright notice and this permission notice shall be |
| 57 |
included in all copies or substantial portions of the Software. |
| 58 |
|
| 59 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 60 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 61 |
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 62 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
| 63 |
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
| 64 |
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
| 65 |
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 66 |
|
| 67 |
= RAKE -- Ruby Make -- <em>mainline branch</em> |
| 68 |
|
| 69 |
Supporting Rake version: 0.8.7. |
| 70 |
|
| 71 |
This package contains Rake, a simple ruby build program with |
| 72 |
capabilities similar to make. |
| 73 |
|
| 74 |
Rake has the following features: |
| 75 |
|
| 76 |
* Rakefiles (rake's version of Makefiles) are completely defined in |
| 77 |
standard Ruby syntax. No XML files to edit. No quirky Makefile |
| 78 |
syntax to worry about (is that a tab or a space?) |
| 79 |
|
| 80 |
* Users can specify tasks with prerequisites. |
| 81 |
|
| 82 |
* Rake supports rule patterns to synthesize implicit tasks. |
| 83 |
|
| 84 |
* Flexible FileLists that act like arrays but know about manipulating |
| 85 |
file names and paths. |
| 86 |
|
| 87 |
* A library of prepackaged tasks to make building rakefiles easier. For example, |
| 88 |
tasks for building tarballs, gems and RDoc output are provided. |
| 89 |
|
| 90 |
* Supports parallel execution of tasks. |
| 91 |
|
| 92 |
|
| 93 |
== Installation |
| 94 |
|
| 95 |
=== Gem Installation |
| 96 |
|
| 97 |
Download and install rake with the following. |
| 98 |
|
| 99 |
gem install rake |
| 100 |
|
| 101 |
=== Normal Installation |
| 102 |
|
| 103 |
You can download the source tarball of the latest version of Rake from |
| 104 |
|
| 105 |
* http://rubyforge.org/project/showfiles.php?group_id=50 |
| 106 |
|
| 107 |
Extract the tarball and run |
| 108 |
|
| 109 |
% ruby install.rb |
| 110 |
|
| 111 |
from its distribution directory. |
| 112 |
|
| 113 |
== Usage |
| 114 |
|
| 115 |
=== Simple Example |
| 116 |
|
| 117 |
First, you must write a "Rakefile" file which contains the build rules. Here's |
| 118 |
a simple example: |
| 119 |
|
| 120 |
task :default => [:test] |
| 121 |
|
| 122 |
task :test do |
| 123 |
ruby "test/unittest.rb" |
| 124 |
end |
| 125 |
|
| 126 |
This Rakefile has two tasks: |
| 127 |
|
| 128 |
* A task named "test", which - upon invocation - will run a unit test file in |
| 129 |
Ruby. |
| 130 |
* A task named "default". This task does nothing by itself, but it has exactly |
| 131 |
one dependency, namely the "test" task. Invoking the "default" task will |
| 132 |
cause Rake to invoke the "test" task as well. |
| 133 |
|
| 134 |
Running the "rake" command without any options will cause it to run the |
| 135 |
"default" task in the Rakefile: |
| 136 |
|
| 137 |
% ls |
| 138 |
Rakefile test/ |
| 139 |
% rake |
| 140 |
(in /home/some_user/Projects/rake) |
| 141 |
ruby test/unittest.rb |
| 142 |
....unit test output here... |
| 143 |
|
| 144 |
Type "rake --help" for all available options. |
| 145 |
|
| 146 |
|
| 147 |
=== More Information |
| 148 |
|
| 149 |
* For details on Rake's command-line invocation, read |
| 150 |
doc/command_line_usage.rdoc[http://rake.rubyforge.org/files/doc/command_line_usage_rdoc.html] |
| 151 |
* For details on writing Rakefiles, see |
| 152 |
doc/rakefile.rdoc[http://rake.rubyforge.org/files/doc/rakefile_rdoc.html]. |
| 153 |
* For the original announcement of Rake, see |
| 154 |
doc/rational.rdoc[http://rake.rubyforge.org/files/doc/rational_rdoc.html]. |
| 155 |
* For a glossary of terms, see |
| 156 |
doc/glossary.rdoc[http://rake.rubyforge.org/files/doc/glossary_rdoc.html]. |
| 157 |
|
| 158 |
== Development |
| 159 |
|
| 160 |
=== Source Repository |
| 161 |
|
| 162 |
Rake is currently hosted at github. The github web page is |
| 163 |
http://github.com/jimweirich/rake. The public git clone URL is |
| 164 |
|
| 165 |
* git://github.com/jimweirich/rake.git |
| 166 |
|
| 167 |
=== Running the Rake Test Suite |
| 168 |
|
| 169 |
If you wish to run the unit and functional tests that come with Rake: |
| 170 |
|
| 171 |
* Install the 'flexmock' gem |
| 172 |
* Install the 'session' gem in order to run the functional tests. |
| 173 |
* CD into the top project directory of rake. |
| 174 |
* Type one of the following: |
| 175 |
|
| 176 |
rake # If you have a version of rake installed |
| 177 |
ruby -Ilib bin/rake # If you do not have a version of rake installed. |
| 178 |
|
| 179 |
=== Issues and Bug Reports |
| 180 |
|
| 181 |
Feature requests and bug reports can be made here |
| 182 |
|
| 183 |
* http://onestepback.org/cgi-bin/bugs.cgi?project=rake |
| 184 |
|
| 185 |
No account is needed for posting requests. Or you can send me an |
| 186 |
email (at jim dot weirich at gmail dot com) |
| 187 |
|
| 188 |
Issues and bug reports can be tracked here: |
| 189 |
|
| 190 |
* http://www.pivotaltracker.com/projects/28469 |
| 191 |
|
| 192 |
== Online Resources |
| 193 |
|
| 194 |
=== Rake References |
| 195 |
|
| 196 |
* Rake Documentation Home: http://docs.rubyrake.org |
| 197 |
* Rake Project Page: http://rubyforge.org/projects/rake |
| 198 |
* Rake API Documents: http://rake.rubyforge.org |
| 199 |
* Rake Source Code Repo: http://github.com/jimweirich/rake |
| 200 |
* Rake Git Repo Clone URL: git://github.com/jimweirich/rake.git |
| 201 |
* Rake Issue Tracking: http://www.pivotaltracker.com/projects/28469 |
| 202 |
* Rake Bug Reports: http://onestepback.org/cgi-bin/bugs.cgi?project=rake |
| 203 |
|
| 204 |
=== Presentations and Articles about Rake |
| 205 |
|
| 206 |
* Jim Weirich's 2003 RubyConf presentation: http://onestepback.org/articles/buildingwithrake/ |
| 207 |
* Martin Fowler's article on Rake: http://martinfowler.com/articles/rake.html |
| 208 |
|
| 209 |
== Other Make Reinvisionings ... |
| 210 |
|
| 211 |
Rake is a late entry in the make replacement field. Here are links to |
| 212 |
other projects with similar (and not so similar) goals. |
| 213 |
|
| 214 |
* http://directory.fsf.org/bras.html -- Bras, one of earliest |
| 215 |
implementations of "make in a scripting language". |
| 216 |
* http://www.a-a-p.org -- Make in Python |
| 217 |
* http://www.aromatic.com/tools/jam.txt -- JAM, Java Automated Make |
| 218 |
* http://ant.apache.org -- The Ant project |
| 219 |
* http://ppt.perl.org/commands/make/index.html -- Make from the Perl |
| 220 |
Power Tools implementation. |
| 221 |
* http://search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System |
| 222 |
* http://make.rubyforge.org -- Rant, another Ruby make tool. |
| 223 |
|
| 224 |
== Credits |
| 225 |
|
| 226 |
[<b>Ryan Dlugosz</b>] For the initial conversation that sparked Rake. |
| 227 |
|
| 228 |
[<b>[email protected]</b>] For the initial patch for rule support. |
| 229 |
|
| 230 |
[<b>Tilman Sauerbeck <[email protected]></b>] For the recursive rule patch. |
| 231 |
|
| 232 |
== License |
| 233 |
|
| 234 |
Rake is available under an MIT-style license. |
| 235 |
|
| 236 |
:include: MIT-LICENSE |
| 237 |
|
| 238 |
== Support |
| 239 |
|
| 240 |
The Rake homepage is http://rake.rubyforge.org. You can find the Rake |
| 241 |
RubyForge page at http://rubyforge.org/projects/rake. |
| 242 |
|
| 243 |
Feel free to submit commits or feature requests. If you send a patch, |
| 244 |
remember to update the corresponding unit tests. In fact, I prefer |
| 245 |
new feature to be submitted in the form of new unit tests. |
| 246 |
|
| 247 |
For other information, feel free to ask on the ruby-talk mailing list |
| 248 |
(which is mirrored to comp.lang.ruby) or contact |
| 249 |
jim dot weirich at gmail.com. |
| 250 |
|
| 251 |
--- |
| 252 |
|
| 253 |
= Other stuff |
| 254 |
|
| 255 |
Author:: Jim Weirich <[email protected]> |
| 256 |
Requires:: Ruby 1.8.0 or later |
| 257 |
License:: Copyright 2003-2008 by Jim Weirich. |
| 258 |
Released under an MIT-style license. See the LICENSE file |
| 259 |
included in the distribution. |
| 260 |
|
| 261 |
== Warranty |
| 262 |
|
| 263 |
This software is provided "as is" and without any express or |
| 264 |
implied warranties, including, without limitation, the implied |
| 265 |
warranties of merchantibility and fitness for a particular |
| 266 |
purpose. |