podoy 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +35 -0
- data/Rakefile +4 -0
- data/lib/podoy/version.rb +5 -0
- data/lib/podoy.rb +8 -0
- data/sig/podoy.rbs +4 -0
- data/vendor/bundle/ruby/3.3.0+0/bin/rake +29 -0
- data/vendor/bundle/ruby/3.3.0+0/cache/rake-13.1.0.gem +0 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/History.rdoc +2403 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/README.rdoc +155 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/doc/glossary.rdoc +42 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/doc/jamis.rb +592 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/doc/rake.1 +156 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/doc/rakefile.rdoc +622 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/exe/rake +27 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/application.rb +855 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/backtrace.rb +24 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/clean.rb +78 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/cloneable.rb +17 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/cpu_counter.rb +107 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/default_loader.rb +15 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/dsl_definition.rb +195 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/early_time.rb +22 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/ext/core.rb +26 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/ext/string.rb +176 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/file_creation_task.rb +25 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/file_list.rb +435 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/file_task.rb +58 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/file_utils.rb +132 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/file_utils_ext.rb +134 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/invocation_chain.rb +57 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/invocation_exception_mixin.rb +17 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/late_time.rb +18 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/linked_list.rb +112 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/loaders/makefile.rb +54 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/multi_task.rb +14 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/name_space.rb +38 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/packagetask.rb +222 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/phony.rb +16 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/private_reader.rb +21 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/promise.rb +100 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/pseudo_status.rb +30 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/rake_module.rb +67 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/rake_test_loader.rb +27 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/scope.rb +43 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/task.rb +434 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/task_argument_error.rb +8 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/task_arguments.rb +109 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/task_manager.rb +331 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/tasklib.rb +12 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/testtask.rb +189 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/thread_history_display.rb +49 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/thread_pool.rb +163 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/trace_output.rb +23 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/version.rb +10 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake/win32.rb +51 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/lib/rake.rb +71 -0
- data/vendor/bundle/ruby/3.3.0+0/gems/rake-13.1.0/rake.gemspec +101 -0
- data/vendor/bundle/ruby/3.3.0+0/specifications/rake-13.1.0.gemspec +26 -0
- metadata +117 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
Copyright (c) Jim Weirich
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|
@@ -0,0 +1,155 @@
|
|
1
|
+
= RAKE -- Ruby Make
|
2
|
+
|
3
|
+
home :: https://github.com/ruby/rake
|
4
|
+
bugs :: https://github.com/ruby/rake/issues
|
5
|
+
docs :: https://ruby.github.io/rake
|
6
|
+
|
7
|
+
== Description
|
8
|
+
|
9
|
+
Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
|
10
|
+
specified in standard Ruby syntax.
|
11
|
+
|
12
|
+
Rake has the following features:
|
13
|
+
|
14
|
+
* Rakefiles (rake's version of Makefiles) are completely defined in
|
15
|
+
standard Ruby syntax. No XML files to edit. No quirky Makefile
|
16
|
+
syntax to worry about (is that a tab or a space?)
|
17
|
+
|
18
|
+
* Users can specify tasks with prerequisites.
|
19
|
+
|
20
|
+
* Rake supports rule patterns to synthesize implicit tasks.
|
21
|
+
|
22
|
+
* Flexible FileLists that act like arrays but know about manipulating
|
23
|
+
file names and paths.
|
24
|
+
|
25
|
+
* A library of prepackaged tasks to make building rakefiles easier. For example,
|
26
|
+
tasks for building tarballs. (Formerly
|
27
|
+
tasks for building RDoc, Gems, and publishing to FTP were included in rake but they're now
|
28
|
+
available in RDoc, RubyGems, and rake-contrib respectively.)
|
29
|
+
|
30
|
+
* Supports parallel execution of tasks.
|
31
|
+
|
32
|
+
== Installation
|
33
|
+
|
34
|
+
=== Gem Installation
|
35
|
+
|
36
|
+
Download and install rake with the following.
|
37
|
+
|
38
|
+
gem install rake
|
39
|
+
|
40
|
+
== Usage
|
41
|
+
|
42
|
+
=== Simple Example
|
43
|
+
|
44
|
+
First, you must write a "Rakefile" file which contains the build rules. Here's
|
45
|
+
a simple example:
|
46
|
+
|
47
|
+
task default: %w[test]
|
48
|
+
|
49
|
+
task :test do
|
50
|
+
ruby "test/unittest.rb"
|
51
|
+
end
|
52
|
+
|
53
|
+
This Rakefile has two tasks:
|
54
|
+
|
55
|
+
* A task named "test", which -- upon invocation -- will run a unit test file
|
56
|
+
in Ruby.
|
57
|
+
* A task named "default". This task does nothing by itself, but it has exactly
|
58
|
+
one dependency, namely the "test" task. Invoking the "default" task will
|
59
|
+
cause Rake to invoke the "test" task as well.
|
60
|
+
|
61
|
+
Running the "rake" command without any options will cause it to run the
|
62
|
+
"default" task in the Rakefile:
|
63
|
+
|
64
|
+
% ls
|
65
|
+
Rakefile test/
|
66
|
+
% rake
|
67
|
+
(in /home/some_user/Projects/rake)
|
68
|
+
ruby test/unittest.rb
|
69
|
+
....unit test output here...
|
70
|
+
|
71
|
+
Type "rake --help" for all available options.
|
72
|
+
|
73
|
+
== Resources
|
74
|
+
|
75
|
+
=== Rake Information
|
76
|
+
|
77
|
+
* {Rake command-line}[link:doc/command_line_usage.rdoc]
|
78
|
+
* {Writing Rakefiles}[link:doc/rakefile.rdoc]
|
79
|
+
* The original {Rake announcement}[link:doc/rational.rdoc]
|
80
|
+
* Rake {glossary}[link:doc/glossary.rdoc]
|
81
|
+
|
82
|
+
=== Presentations and Articles about Rake
|
83
|
+
|
84
|
+
* Avdi Grimm's rake series:
|
85
|
+
1. {Rake Basics}[https://avdi.codes/rake-part-1-basics/]
|
86
|
+
2. {Rake File Lists}[https://avdi.codes/rake-part-2-file-lists-2/]
|
87
|
+
3. {Rake Rules}[https://avdi.codes/rake-part-3-rules/]
|
88
|
+
4. {Rake Pathmap}[https://avdi.codes/rake-part-4-pathmap/]
|
89
|
+
5. {File Operations}[https://avdi.codes/rake-part-5-file-operations/]
|
90
|
+
6. {Clean and Clobber}[https://avdi.codes/rake-part-6-clean-and-clobber/]
|
91
|
+
7. {MultiTask}[https://avdi.codes/rake-part-7-multitask/]
|
92
|
+
* {Jim Weirich's 2003 RubyConf presentation}[https://web.archive.org/web/20140221123354/http://onestepback.org/articles/buildingwithrake/]
|
93
|
+
* Martin Fowler's article on Rake: https://martinfowler.com/articles/rake.html
|
94
|
+
|
95
|
+
== Other Make Re-envisionings ...
|
96
|
+
|
97
|
+
Rake is a late entry in the make replacement field. Here are links to
|
98
|
+
other projects with similar (and not so similar) goals.
|
99
|
+
|
100
|
+
* https://directory.fsf.org/wiki/Bras -- Bras, one of earliest
|
101
|
+
implementations of "make in a scripting language".
|
102
|
+
* http://www.a-a-p.org -- Make in Python
|
103
|
+
* https://ant.apache.org -- The Ant project
|
104
|
+
* https://search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System
|
105
|
+
* https://www.rubydoc.info/gems/rant/0.5.7/frames -- Rant, another Ruby make tool.
|
106
|
+
|
107
|
+
== Credits
|
108
|
+
|
109
|
+
[<b>Jim Weirich</b>] Who originally created Rake.
|
110
|
+
|
111
|
+
[<b>Ryan Dlugosz</b>] For the initial conversation that sparked Rake.
|
112
|
+
|
113
|
+
[<b>Nobuyoshi Nakada <nobu@ruby-lang.org></b>] For the initial patch for rule support.
|
114
|
+
|
115
|
+
[<b>Tilman Sauerbeck <tilman@code-monkey.de></b>] For the recursive rule patch.
|
116
|
+
|
117
|
+
[<b>Eric Hodel</b>] For aid in maintaining rake.
|
118
|
+
|
119
|
+
[<b>Hiroshi SHIBATA</b>] Maintainer of Rake 10 and later
|
120
|
+
|
121
|
+
== License
|
122
|
+
|
123
|
+
Rake is available under an MIT-style license.
|
124
|
+
|
125
|
+
:include: MIT-LICENSE
|
126
|
+
|
127
|
+
---
|
128
|
+
|
129
|
+
= Other stuff
|
130
|
+
|
131
|
+
Author:: Jim Weirich <jim.weirich@gmail.com>
|
132
|
+
Requires:: Ruby 2.0.0 or later
|
133
|
+
License:: Copyright Jim Weirich.
|
134
|
+
Released under an MIT-style license. See the MIT-LICENSE
|
135
|
+
file included in the distribution.
|
136
|
+
|
137
|
+
== Warranty
|
138
|
+
|
139
|
+
This software is provided "as is" and without any express or implied
|
140
|
+
warranties, including, without limitation, the implied warranties of
|
141
|
+
merchantability and fitness for a particular purpose.
|
142
|
+
|
143
|
+
== Historical
|
144
|
+
|
145
|
+
Rake was originally created by Jim Weirich, who unfortunately passed away in
|
146
|
+
February 2014. This repository was originally hosted at
|
147
|
+
{github.com/jimweirich/rake}[https://github.com/jimweirich/rake/], however
|
148
|
+
with his passing, has been moved to {ruby/rake}[https://github.com/ruby/rake].
|
149
|
+
|
150
|
+
You can view Jim's last commit here:
|
151
|
+
https://github.com/jimweirich/rake/tree/336559f28f55bce418e2ebcc0a57548dcbac4025
|
152
|
+
|
153
|
+
You can {read more about Jim}[https://en.wikipedia.org/wiki/Jim_Weirich] at Wikipedia.
|
154
|
+
|
155
|
+
Thank you for this great tool, Jim. We'll remember you.
|
@@ -0,0 +1,158 @@
|
|
1
|
+
= Rake Command Line Usage
|
2
|
+
|
3
|
+
Rake is invoked from the command line using:
|
4
|
+
|
5
|
+
% rake [options ...] [VAR=VALUE ...] [targets ...]
|
6
|
+
|
7
|
+
Options are:
|
8
|
+
|
9
|
+
[<tt><em>name</em>=<em>value</em></tt>]
|
10
|
+
Set the environment variable <em>name</em> to <em>value</em>
|
11
|
+
during the execution of the <b>rake</b> command. You can access
|
12
|
+
the value by using ENV['<em>name</em>'].
|
13
|
+
|
14
|
+
[<tt>--all</tt> (-A)]
|
15
|
+
Used in combination with the -T and -D options, will force
|
16
|
+
those options to show all the tasks, even the ones without comments.
|
17
|
+
|
18
|
+
[<tt>--backtrace</tt>{=_output_} (-n)]
|
19
|
+
Enable a full backtrace (i.e. like --trace, but without the task
|
20
|
+
tracing details). The _output_ parameter is optional, but if
|
21
|
+
specified it controls where the backtrace output is sent. If
|
22
|
+
_output_ is <tt>stdout</tt>, then backtrace output is directed to
|
23
|
+
standard output. If _output_ is <tt>stderr</tt>, or if it is
|
24
|
+
missing, then the backtrace output is sent to standard error.
|
25
|
+
|
26
|
+
[<tt>--comments</tt>]
|
27
|
+
Used in combination with the -W options to force the output to
|
28
|
+
contain commented options only. This is the reverse of
|
29
|
+
<tt>--all</tt>.
|
30
|
+
|
31
|
+
[<tt>--describe</tt> _pattern_ (-D)]
|
32
|
+
Describe the tasks (matching optional PATTERN), then exit.
|
33
|
+
|
34
|
+
[<tt>--dry-run</tt> (-n)]
|
35
|
+
Do a dry run. Print the tasks invoked and executed, but do not
|
36
|
+
actually execute any of the actions.
|
37
|
+
|
38
|
+
[<tt>--execute</tt> _code_ (-e)]
|
39
|
+
Execute some Ruby code and exit.
|
40
|
+
|
41
|
+
[<tt>--execute-print</tt> _code_ (-p)]
|
42
|
+
Execute some Ruby code, print the result, and exit.
|
43
|
+
|
44
|
+
[<tt>--execute-continue</tt> _code_ (-E)]
|
45
|
+
Execute some Ruby code, then continue with normal task processing.
|
46
|
+
|
47
|
+
[<tt>--help</tt> (-H)]
|
48
|
+
Display some help text and exit.
|
49
|
+
|
50
|
+
[<tt>--jobs</tt> _number_ (-j)]
|
51
|
+
|
52
|
+
Specifies the maximum number of concurrent threads allowed. Rake
|
53
|
+
will allocate threads as needed up to this maximum number.
|
54
|
+
|
55
|
+
If omitted, Rake will attempt to estimate the number of CPUs on
|
56
|
+
the system and add 4 to that number.
|
57
|
+
|
58
|
+
The concurrent threads are used to execute the <tt>multitask</tt>
|
59
|
+
prerequisites. Also see the <tt>-m</tt> option which turns all
|
60
|
+
tasks into multitasks.
|
61
|
+
|
62
|
+
Sample values:
|
63
|
+
(no -j) : Allow up to (# of CPUs + 4) number of threads
|
64
|
+
--jobs : Allow unlimited number of threads
|
65
|
+
--jobs=1 : Allow only one thread (the main thread)
|
66
|
+
--jobs=16 : Allow up to 16 concurrent threads
|
67
|
+
|
68
|
+
[<tt>--job-stats</tt> _level_]
|
69
|
+
|
70
|
+
Display job statistics at the completion of the run. By default,
|
71
|
+
this will display the requested number of active threads (from the
|
72
|
+
-j options) and the maximum number of threads in play at any given
|
73
|
+
time.
|
74
|
+
|
75
|
+
If the optional _level_ is <tt>history</tt>, then a complete trace
|
76
|
+
of task history will be displayed on standard output.
|
77
|
+
|
78
|
+
[<tt>--libdir</tt> _directory_ (-I)]
|
79
|
+
Add _directory_ to the list of directories searched for require.
|
80
|
+
|
81
|
+
[<tt>--multitask</tt> (-m)]
|
82
|
+
Treat all tasks as multitasks. ('make/drake' semantics)
|
83
|
+
|
84
|
+
[<tt>--nosearch</tt> (-N)]
|
85
|
+
Do not search for a Rakefile in parent directories.
|
86
|
+
|
87
|
+
[<tt>--prereqs</tt> (-P)]
|
88
|
+
Display a list of all tasks and their immediate prerequisites.
|
89
|
+
|
90
|
+
[<tt>--quiet</tt> (-q)]
|
91
|
+
Do not echo commands from FileUtils.
|
92
|
+
|
93
|
+
[<tt>--rakefile</tt> _filename_ (-f)]
|
94
|
+
Use _filename_ as the name of the rakefile. The default rakefile
|
95
|
+
names are +rakefile+ and +Rakefile+ (with +rakefile+ taking
|
96
|
+
precedence). If the rakefile is not found in the current
|
97
|
+
directory, +rake+ will search parent directories for a match. The
|
98
|
+
directory where the Rakefile is found will become the current
|
99
|
+
directory for the actions executed in the Rakefile.
|
100
|
+
|
101
|
+
[<tt>--rakelibdir</tt> _rakelibdir_ (-R)]
|
102
|
+
Auto-import any .rake files in RAKELIBDIR. (default is 'rakelib')
|
103
|
+
|
104
|
+
[<tt>--require</tt> _name_ (-r)]
|
105
|
+
Require _name_ before executing the Rakefile.
|
106
|
+
|
107
|
+
[<tt>--rules</tt>]
|
108
|
+
Trace the rules resolution.
|
109
|
+
|
110
|
+
[<tt>--silent (-s)</tt>]
|
111
|
+
Like --quiet, but also suppresses the 'in directory' announcement.
|
112
|
+
|
113
|
+
[<tt>--suppress-backtrace _pattern_ </tt>]
|
114
|
+
Line matching the regular expression _pattern_ will be removed
|
115
|
+
from the backtrace output. Note that the --backtrace option is the
|
116
|
+
full backtrace without these lines suppressed.
|
117
|
+
|
118
|
+
[<tt>--system</tt> (-g)]
|
119
|
+
Use the system wide (global) rakefiles. The project Rakefile is
|
120
|
+
ignored. By default, the system wide rakefiles are used only if no
|
121
|
+
project Rakefile is found. On Unix-like system, the system wide
|
122
|
+
rake files are located in $HOME/.rake. On a windows system they
|
123
|
+
are stored in $APPDATA/Rake.
|
124
|
+
|
125
|
+
[<tt>--no-system</tt> (-G)]
|
126
|
+
Use the project level Rakefile, ignoring the system-wide (global)
|
127
|
+
rakefiles.
|
128
|
+
|
129
|
+
[<tt>--tasks</tt> <em>pattern</em> (-T)]
|
130
|
+
Display a list of the major tasks and their comments. Comments
|
131
|
+
are defined using the "desc" command. If a pattern is given, then
|
132
|
+
only tasks matching the pattern are displayed.
|
133
|
+
|
134
|
+
[<tt>--trace</tt>{=_output_} (-t)]
|
135
|
+
Turn on invoke/execute tracing. Also enable full backtrace on
|
136
|
+
errors. The _output_ parameter is optional, but if specified it
|
137
|
+
controls where the trace output is sent. If _output_ is
|
138
|
+
<tt>stdout</tt>, then trace output is directed to standard output.
|
139
|
+
If _output_ is <tt>stderr</tt>, or if it is missing, then trace
|
140
|
+
output is sent to standard error.
|
141
|
+
|
142
|
+
[<tt>--verbose</tt> (-v)]
|
143
|
+
Echo the Sys commands to standard output.
|
144
|
+
|
145
|
+
[<tt>--version</tt> (-V)]
|
146
|
+
Display the program version and exit.
|
147
|
+
|
148
|
+
[<tt>--where</tt> <em>pattern</em> (-W)]
|
149
|
+
Display tasks that match <em>pattern</em> and the file and line
|
150
|
+
number where the task is defined. By default this option will
|
151
|
+
display all tasks, not just the tasks that have descriptions.
|
152
|
+
|
153
|
+
[<tt>--no-deprecation-warnings</tt> (-X)]
|
154
|
+
Do not display the deprecation warnings.
|
155
|
+
|
156
|
+
In addition, any command line option of the form
|
157
|
+
<em>VAR</em>=<em>VALUE</em> will be added to the environment hash
|
158
|
+
<tt>ENV</tt> and may be tested in the Rakefile.
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Example Rakefile -*- ruby -*-
|
2
|
+
|
3
|
+
task :default => [:main]
|
4
|
+
|
5
|
+
file "a.o" => ["a.c"] do |t|
|
6
|
+
src = t.name.sub(/\.o$/, '.c')
|
7
|
+
sh "gcc #{src} -c -o #{t.name}"
|
8
|
+
end
|
9
|
+
|
10
|
+
file "b.o" => ["b.c"] do |t|
|
11
|
+
src = t.name.sub(/\.o$/, '.c')
|
12
|
+
sh "gcc #{src} -c -o #{t.name}"
|
13
|
+
end
|
14
|
+
|
15
|
+
file "main.o" => ["main.c"] do |t|
|
16
|
+
src = t.name.sub(/\.o$/, '.c')
|
17
|
+
sh "gcc #{src} -c -o #{t.name}"
|
18
|
+
end
|
19
|
+
|
20
|
+
OBJFILES = ["a.o", "b.o", "main.o"]
|
21
|
+
task :obj => OBJFILES
|
22
|
+
|
23
|
+
file "main" => OBJFILES do |t|
|
24
|
+
sh "gcc -o #{t.name} main.o a.o b.o"
|
25
|
+
end
|
26
|
+
|
27
|
+
task :clean do
|
28
|
+
rm_f FileList['*.o']
|
29
|
+
Dir['*~'].each { |fn| rm_f fn }
|
30
|
+
end
|
31
|
+
|
32
|
+
task :clobber => [:clean] do
|
33
|
+
rm_f "main"
|
34
|
+
end
|
35
|
+
|
36
|
+
task :run => ["main"] do
|
37
|
+
sh "./main"
|
38
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# Example Rakefile -*- ruby -*-
|
2
|
+
# Using the power of Ruby
|
3
|
+
|
4
|
+
task :default => [:main]
|
5
|
+
|
6
|
+
def ext(fn, newext)
|
7
|
+
fn.sub(/\.[^.]+$/, newext)
|
8
|
+
end
|
9
|
+
|
10
|
+
SRCFILES = Dir['*.c']
|
11
|
+
OBJFILES = SRCFILES.collect { |fn| ext(fn,".o") }
|
12
|
+
|
13
|
+
OBJFILES.each do |objfile|
|
14
|
+
srcfile = ext(objfile, ".c")
|
15
|
+
file objfile => [srcfile] do |t|
|
16
|
+
sh "gcc #{srcfile} -c -o #{t.name}"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
file "main" => OBJFILES do |t|
|
21
|
+
sh "gcc -o #{t.name} main.o a.o b.o"
|
22
|
+
end
|
23
|
+
|
24
|
+
task :clean do
|
25
|
+
rm_f FileList['*.o']
|
26
|
+
Dir['*~'].each { |fn| rm_f fn }
|
27
|
+
end
|
28
|
+
|
29
|
+
task :clobber => [:clean] do
|
30
|
+
rm_f "main"
|
31
|
+
end
|
32
|
+
|
33
|
+
task :run => ["main"] do
|
34
|
+
sh "./main"
|
35
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
= Glossary
|
2
|
+
|
3
|
+
action ::
|
4
|
+
Code to be executed in order to perform a task. Actions in a Rakefile are
|
5
|
+
specified in a code block. (Usually delimited by +do+/+end+ pairs.)
|
6
|
+
|
7
|
+
execute ::
|
8
|
+
When a task is executed, all of its actions are performed in the order they
|
9
|
+
were defined. Note that, unlike <tt>invoke</tt>, <tt>execute</tt> always
|
10
|
+
executes the actions (without invoking or executing the prerequisites).
|
11
|
+
|
12
|
+
file task (Rake::FileTask) ::
|
13
|
+
A file task is a task whose purpose is to create a file (which has the same
|
14
|
+
name as the task). When invoked, a file task will only execute if one or
|
15
|
+
more of the following conditions are true.
|
16
|
+
|
17
|
+
1. The associated file does not exist.
|
18
|
+
2. A prerequisite has a later time stamp than the existing file.
|
19
|
+
|
20
|
+
Because normal Tasks always have the current time as timestamp, a FileTask
|
21
|
+
that has a normal Task prerequisite will always execute.
|
22
|
+
|
23
|
+
invoke ::
|
24
|
+
When a task is invoked, first we check to see if it has been invoked before.
|
25
|
+
If it has been, then nothing else is done. If this is the first time it has
|
26
|
+
been invoked, then we invoke each of its prerequisites. Finally, we check
|
27
|
+
to see if we need to execute the actions of this task by calling
|
28
|
+
Rake::Task#needed?. If the task is needed, we execute its actions.
|
29
|
+
|
30
|
+
NOTE: Prerequisites are still invoked even if the task is not needed.
|
31
|
+
|
32
|
+
prerequisites ::
|
33
|
+
Every task has a (possibly empty) set of prerequisites. A prerequisite P to
|
34
|
+
Task T is itself a task that must be invoked before Task T.
|
35
|
+
|
36
|
+
rule ::
|
37
|
+
A rule is a recipe for synthesizing a task when no task is explicitly
|
38
|
+
defined. Rules generally synthesize file tasks.
|
39
|
+
|
40
|
+
task (Rake::Task) ::
|
41
|
+
The basic unit of work in a Rakefile. A task has a name, a set of
|
42
|
+
prerequisites, and a list of actions to be performed.
|