rubu 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +3 -0
- data/README.rdoc +236 -8
- data/doc/Array.html +103 -38
- data/doc/Rubu.html +2 -2
- data/doc/Rubu/AgedStep.html +275 -0
- data/doc/Rubu/AlwaysStep.html +275 -0
- data/doc/Rubu/Fork.html +20 -20
- data/doc/Rubu/Info.html +39 -13
- data/doc/Rubu/Mark.html +318 -110
- data/doc/Rubu/MarkStep.html +275 -0
- data/doc/Rubu/Move.html +937 -0
- data/doc/Rubu/MoveStyles.html +403 -0
- data/doc/Rubu/Order.html +39 -13
- data/doc/Rubu/RubyCommand.html +39 -26
- data/doc/Rubu/ShellCommand.html +37 -24
- data/doc/Rubu/State.html +135 -38
- data/doc/Rubu/Step.html +1859 -0
- data/doc/Rubu/StepAged.html +279 -0
- data/doc/Rubu/StepAlways.html +279 -0
- data/doc/Rubu/StepMark.html +279 -0
- data/doc/Rubu/Trail.html +1022 -0
- data/doc/Rubu/TrailRun.html +377 -0
- data/doc/Rubu/Var.html +39 -13
- data/doc/Rubu/Walk.html +16 -16
- data/doc/_index.html +51 -59
- data/doc/class_list.html +1 -1
- data/doc/file.CHANGELOG.html +5 -2
- data/doc/file.README.html +255 -8
- data/doc/index.html +255 -8
- data/doc/method_list.html +88 -88
- data/doc/top-level-namespace.html +1 -1
- data/example/bin/rubu_example +49 -51
- data/example/build/hello +0 -0
- data/example/build/hello_world.o +0 -0
- data/example/build/world.c +6 -0
- data/example/build/world.o +0 -0
- data/lib/rubu.rb +168 -85
- data/lib/version.rb +1 -1
- metadata +17 -2
data/doc/Rubu/Walk.html
CHANGED
@@ -73,14 +73,14 @@
|
|
73
73
|
|
74
74
|
<dt class="r1">Inherits:</dt>
|
75
75
|
<dd class="r1">
|
76
|
-
<span class="inheritName"><span class='object_link'><a href="
|
76
|
+
<span class="inheritName"><span class='object_link'><a href="Trail.html" title="Rubu::Trail (class)">Trail</a></span></span>
|
77
77
|
|
78
78
|
<ul class="fullTree">
|
79
79
|
<li>Object</li>
|
80
80
|
|
81
|
-
<li class="next"><span class='object_link'><a href="
|
81
|
+
<li class="next"><span class='object_link'><a href="Move.html" title="Rubu::Move (class)">Move</a></span></li>
|
82
82
|
|
83
|
-
<li class="next"><span class='object_link'><a href="
|
83
|
+
<li class="next"><span class='object_link'><a href="Trail.html" title="Rubu::Trail (class)">Trail</a></span></li>
|
84
84
|
|
85
85
|
<li class="next">Rubu::Walk</li>
|
86
86
|
|
@@ -106,7 +106,7 @@
|
|
106
106
|
<h2>Overview</h2><div class="docstring">
|
107
107
|
<div class="discussion">
|
108
108
|
|
109
|
-
<p>Serial
|
109
|
+
<p>Serial Trail.</p>
|
110
110
|
|
111
111
|
|
112
112
|
</div>
|
@@ -122,13 +122,13 @@
|
|
122
122
|
|
123
123
|
<h2>Instance Attribute Summary</h2>
|
124
124
|
|
125
|
-
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="
|
126
|
-
<p class="inherited"><span class='object_link'><a href="
|
125
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Trail.html" title="Rubu::Trail (class)">Trail</a></span></h3>
|
126
|
+
<p class="inherited"><span class='object_link'><a href="Trail.html#name-instance_method" title="Rubu::Trail#name (method)">#name</a></span></p>
|
127
127
|
|
128
128
|
|
129
129
|
|
130
|
-
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="
|
131
|
-
<p class="inherited"><span class='object_link'><a href="
|
130
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Move.html" title="Rubu::Move (class)">Move</a></span></h3>
|
131
|
+
<p class="inherited"><span class='object_link'><a href="Move.html#errmsg-instance_method" title="Rubu::Move#errmsg (method)">#errmsg</a></span>, <span class='object_link'><a href="Move.html#output-instance_method" title="Rubu::Move#output (method)">#output</a></span>, <span class='object_link'><a href="Move.html#status-instance_method" title="Rubu::Move#status (method)">#status</a></span>, <span class='object_link'><a href="Move.html#subs-instance_method" title="Rubu::Move#subs (method)">#subs</a></span></p>
|
132
132
|
|
133
133
|
|
134
134
|
|
@@ -140,8 +140,8 @@
|
|
140
140
|
|
141
141
|
<h2>Method Summary</h2>
|
142
142
|
|
143
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="
|
144
|
-
<p class="inherited"><span class='object_link'><a href="
|
143
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Trail.html" title="Rubu::Trail (class)">Trail</a></span></h3>
|
144
|
+
<p class="inherited"><span class='object_link'><a href="Trail.html#%5B%5D-class_method" title="Rubu::Trail.[] (method)">[]</a></span>, <span class='object_link'><a href="Trail.html#form-class_method" title="Rubu::Trail.form (method)">form</a></span>, <span class='object_link'><a href="Trail.html#initialize-instance_method" title="Rubu::Trail#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Trail.html#load_setup-class_method" title="Rubu::Trail.load_setup (method)">load_setup</a></span>, <span class='object_link'><a href="Trail.html#pick-instance_method" title="Rubu::Trail#pick (method)">#pick</a></span>, <span class='object_link'><a href="Trail.html#run-instance_method" title="Rubu::Trail#run (method)">#run</a></span>, <span class='object_link'><a href="Trail.html#run-class_method" title="Rubu::Trail.run (method)">run</a></span>, <span class='object_link'><a href="Trail.html#setup-class_method" title="Rubu::Trail.setup (method)">setup</a></span></p>
|
145
145
|
|
146
146
|
|
147
147
|
|
@@ -151,8 +151,8 @@
|
|
151
151
|
|
152
152
|
|
153
153
|
|
154
|
-
<h3 class="inherited">Methods included from <span class='object_link'><a href="
|
155
|
-
<p class="inherited"><span class='object_link'><a href="
|
154
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="MoveStyles.html" title="Rubu::MoveStyles (module)">MoveStyles</a></span></h3>
|
155
|
+
<p class="inherited"><span class='object_link'><a href="MoveStyles.html#parallel_run-instance_method" title="Rubu::MoveStyles#parallel_run (method)">#parallel_run</a></span>, <span class='object_link'><a href="MoveStyles.html#serial_run-instance_method" title="Rubu::MoveStyles#serial_run (method)">#serial_run</a></span></p>
|
156
156
|
|
157
157
|
|
158
158
|
|
@@ -162,12 +162,12 @@
|
|
162
162
|
|
163
163
|
|
164
164
|
|
165
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="
|
166
|
-
<p class="inherited"><span class='object_link'><a href="
|
165
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Move.html" title="Rubu::Move (class)">Move</a></span></h3>
|
166
|
+
<p class="inherited"><span class='object_link'><a href="Move.html#display-instance_method" title="Rubu::Move#display (method)">#display</a></span>, <span class='object_link'><a href="Move.html#error-instance_method" title="Rubu::Move#error (method)">#error</a></span>, <span class='object_link'><a href="Move.html#host-instance_method" title="Rubu::Move#host (method)">#host</a></span>, <span class='object_link'><a href="Move.html#host_in-instance_method" title="Rubu::Move#host_in (method)">#host_in</a></span>, <span class='object_link'><a href="Move.html#host_out-instance_method" title="Rubu::Move#host_out (method)">#host_out</a></span>, <span class='object_link'><a href="Move.html#initialize-instance_method" title="Rubu::Move#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Move.html#use-instance_method" title="Rubu::Move#use (method)">#use</a></span></p>
|
167
167
|
<div id="constructor_details" class="method_details_list">
|
168
168
|
<h2>Constructor Details</h2>
|
169
169
|
|
170
|
-
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="
|
170
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Trail.html#initialize-instance_method" title="Rubu::Trail#initialize (method)">Rubu::Trail</a></span></p>
|
171
171
|
|
172
172
|
</div>
|
173
173
|
|
@@ -175,7 +175,7 @@
|
|
175
175
|
</div>
|
176
176
|
|
177
177
|
<div id="footer">
|
178
|
-
Generated on
|
178
|
+
Generated on Sun Jul 1 17:48:17 2018 by
|
179
179
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
180
180
|
0.8.7.6 (ruby-2.3.3).
|
181
181
|
</div>
|
data/doc/_index.html
CHANGED
@@ -87,20 +87,6 @@
|
|
87
87
|
<li class="letter">A</li>
|
88
88
|
<ul>
|
89
89
|
|
90
|
-
<li>
|
91
|
-
<span class='object_link'><a href="Rubu/Action.html" title="Rubu::Action (class)">Action</a></span>
|
92
|
-
|
93
|
-
<small>(Rubu)</small>
|
94
|
-
|
95
|
-
</li>
|
96
|
-
|
97
|
-
<li>
|
98
|
-
<span class='object_link'><a href="Rubu/AlwaysBuild.html" title="Rubu::AlwaysBuild (class)">AlwaysBuild</a></span>
|
99
|
-
|
100
|
-
<small>(Rubu)</small>
|
101
|
-
|
102
|
-
</li>
|
103
|
-
|
104
90
|
<li>
|
105
91
|
<span class='object_link'><a href="Array.html" title="Array (class)">Array</a></span>
|
106
92
|
|
@@ -110,12 +96,12 @@
|
|
110
96
|
</ul>
|
111
97
|
|
112
98
|
|
113
|
-
<ul id="
|
114
|
-
<li class="letter">
|
99
|
+
<ul id="alpha_F" class="alpha">
|
100
|
+
<li class="letter">F</li>
|
115
101
|
<ul>
|
116
102
|
|
117
103
|
<li>
|
118
|
-
<span class='object_link'><a href="Rubu/
|
104
|
+
<span class='object_link'><a href="Rubu/Fork.html" title="Rubu::Fork (class)">Fork</a></span>
|
119
105
|
|
120
106
|
<small>(Rubu)</small>
|
121
107
|
|
@@ -125,12 +111,12 @@
|
|
125
111
|
</ul>
|
126
112
|
|
127
113
|
|
128
|
-
<ul id="
|
129
|
-
<li class="letter">
|
114
|
+
<ul id="alpha_I" class="alpha">
|
115
|
+
<li class="letter">I</li>
|
130
116
|
<ul>
|
131
117
|
|
132
118
|
<li>
|
133
|
-
<span class='object_link'><a href="Rubu/
|
119
|
+
<span class='object_link'><a href="Rubu/Info.html" title="Rubu::Info (class)">Info</a></span>
|
134
120
|
|
135
121
|
<small>(Rubu)</small>
|
136
122
|
|
@@ -140,26 +126,26 @@
|
|
140
126
|
</ul>
|
141
127
|
|
142
128
|
|
143
|
-
<ul id="
|
144
|
-
<li class="letter">
|
129
|
+
<ul id="alpha_M" class="alpha">
|
130
|
+
<li class="letter">M</li>
|
145
131
|
<ul>
|
146
132
|
|
147
133
|
<li>
|
148
|
-
<span class='object_link'><a href="Rubu/
|
134
|
+
<span class='object_link'><a href="Rubu/Mark.html" title="Rubu::Mark (class)">Mark</a></span>
|
149
135
|
|
150
136
|
<small>(Rubu)</small>
|
151
137
|
|
152
138
|
</li>
|
153
139
|
|
154
140
|
<li>
|
155
|
-
<span class='object_link'><a href="Rubu/
|
141
|
+
<span class='object_link'><a href="Rubu/Move.html" title="Rubu::Move (class)">Move</a></span>
|
156
142
|
|
157
143
|
<small>(Rubu)</small>
|
158
144
|
|
159
145
|
</li>
|
160
146
|
|
161
147
|
<li>
|
162
|
-
<span class='object_link'><a href="Rubu/
|
148
|
+
<span class='object_link'><a href="Rubu/MoveStyles.html" title="Rubu::MoveStyles (module)">MoveStyles</a></span>
|
163
149
|
|
164
150
|
<small>(Rubu)</small>
|
165
151
|
|
@@ -169,12 +155,12 @@
|
|
169
155
|
</ul>
|
170
156
|
|
171
157
|
|
172
|
-
<ul id="
|
173
|
-
<li class="letter">
|
158
|
+
<ul id="alpha_O" class="alpha">
|
159
|
+
<li class="letter">O</li>
|
174
160
|
<ul>
|
175
161
|
|
176
162
|
<li>
|
177
|
-
<span class='object_link'><a href="Rubu/
|
163
|
+
<span class='object_link'><a href="Rubu/Order.html" title="Rubu::Order (class)">Order</a></span>
|
178
164
|
|
179
165
|
<small>(Rubu)</small>
|
180
166
|
|
@@ -184,19 +170,17 @@
|
|
184
170
|
</ul>
|
185
171
|
|
186
172
|
|
187
|
-
<ul id="
|
188
|
-
<li class="letter">
|
173
|
+
<ul id="alpha_R" class="alpha">
|
174
|
+
<li class="letter">R</li>
|
189
175
|
<ul>
|
190
176
|
|
191
177
|
<li>
|
192
|
-
<span class='object_link'><a href="Rubu
|
193
|
-
|
194
|
-
<small>(Rubu)</small>
|
178
|
+
<span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span>
|
195
179
|
|
196
180
|
</li>
|
197
181
|
|
198
182
|
<li>
|
199
|
-
<span class='object_link'><a href="Rubu/
|
183
|
+
<span class='object_link'><a href="Rubu/RubyCommand.html" title="Rubu::RubyCommand (class)">RubyCommand</a></span>
|
200
184
|
|
201
185
|
<small>(Rubu)</small>
|
202
186
|
|
@@ -206,57 +190,65 @@
|
|
206
190
|
</ul>
|
207
191
|
|
208
192
|
|
209
|
-
<ul id="
|
210
|
-
<li class="letter">
|
193
|
+
<ul id="alpha_S" class="alpha">
|
194
|
+
<li class="letter">S</li>
|
211
195
|
<ul>
|
212
196
|
|
213
197
|
<li>
|
214
|
-
<span class='object_link'><a href="Rubu/
|
198
|
+
<span class='object_link'><a href="Rubu/ShellCommand.html" title="Rubu::ShellCommand (class)">ShellCommand</a></span>
|
215
199
|
|
216
200
|
<small>(Rubu)</small>
|
217
201
|
|
218
202
|
</li>
|
219
203
|
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
<ul id="alpha_R" class="alpha">
|
228
|
-
<li class="letter">R</li>
|
229
|
-
<ul>
|
204
|
+
<li>
|
205
|
+
<span class='object_link'><a href="Rubu/State.html" title="Rubu::State (class)">State</a></span>
|
206
|
+
|
207
|
+
<small>(Rubu)</small>
|
208
|
+
|
209
|
+
</li>
|
230
210
|
|
231
211
|
<li>
|
232
|
-
<span class='object_link'><a href="Rubu.html" title="Rubu (class)">
|
212
|
+
<span class='object_link'><a href="Rubu/Step.html" title="Rubu::Step (class)">Step</a></span>
|
213
|
+
|
214
|
+
<small>(Rubu)</small>
|
233
215
|
|
234
216
|
</li>
|
235
217
|
|
236
218
|
<li>
|
237
|
-
<span class='object_link'><a href="Rubu/
|
219
|
+
<span class='object_link'><a href="Rubu/StepAged.html" title="Rubu::StepAged (class)">StepAged</a></span>
|
238
220
|
|
239
221
|
<small>(Rubu)</small>
|
240
222
|
|
241
223
|
</li>
|
242
224
|
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
<ul>
|
225
|
+
<li>
|
226
|
+
<span class='object_link'><a href="Rubu/StepAlways.html" title="Rubu::StepAlways (class)">StepAlways</a></span>
|
227
|
+
|
228
|
+
<small>(Rubu)</small>
|
229
|
+
|
230
|
+
</li>
|
250
231
|
|
251
232
|
<li>
|
252
|
-
<span class='object_link'><a href="Rubu/
|
233
|
+
<span class='object_link'><a href="Rubu/StepMark.html" title="Rubu::StepMark (class)">StepMark</a></span>
|
253
234
|
|
254
235
|
<small>(Rubu)</small>
|
255
236
|
|
256
237
|
</li>
|
257
238
|
|
239
|
+
</ul>
|
240
|
+
</ul>
|
241
|
+
|
242
|
+
|
243
|
+
</td><td valign='top' width="33%">
|
244
|
+
|
245
|
+
|
246
|
+
<ul id="alpha_T" class="alpha">
|
247
|
+
<li class="letter">T</li>
|
248
|
+
<ul>
|
249
|
+
|
258
250
|
<li>
|
259
|
-
<span class='object_link'><a href="Rubu/
|
251
|
+
<span class='object_link'><a href="Rubu/Trail.html" title="Rubu::Trail (class)">Trail</a></span>
|
260
252
|
|
261
253
|
<small>(Rubu)</small>
|
262
254
|
|
@@ -304,7 +296,7 @@
|
|
304
296
|
</div>
|
305
297
|
|
306
298
|
<div id="footer">
|
307
|
-
Generated on
|
299
|
+
Generated on Sun Jul 1 17:48:17 2018 by
|
308
300
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
309
301
|
0.8.7.6 (ruby-2.3.3).
|
310
302
|
</div>
|
data/doc/class_list.html
CHANGED
@@ -50,7 +50,7 @@
|
|
50
50
|
|
51
51
|
<ul id="full_list" class="class">
|
52
52
|
<li><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></li>
|
53
|
-
<li><span class='object_link'><a href="Array.html" title="Array (class)">Array</a></span> < Object<small class='search_info'>Top Level Namespace</small></li><li><a class='toggle'></a> <span class='object_link'><a href="Rubu.html" title="Rubu (module)">Rubu</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><span class='object_link'><a href="Rubu/
|
53
|
+
<li><span class='object_link'><a href="Array.html" title="Array (class)">Array</a></span> < Object<small class='search_info'>Top Level Namespace</small></li><li><a class='toggle'></a> <span class='object_link'><a href="Rubu.html" title="Rubu (module)">Rubu</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><span class='object_link'><a href="Rubu/Fork.html" title="Rubu::Fork (class)">Fork</a></span> < Trail<small class='search_info'>Rubu</small></li><li><span class='object_link'><a href="Rubu/Info.html" title="Rubu::Info (class)">Info</a></span> < Object<small class='search_info'>Rubu</small></li><li><span class='object_link'><a href="Rubu/Mark.html" title="Rubu::Mark (class)">Mark</a></span> < Object<small class='search_info'>Rubu</small></li><li><span class='object_link'><a href="Rubu/Move.html" title="Rubu::Move (class)">Move</a></span> < Object<small class='search_info'>Rubu</small></li><li><span class='object_link'><a href="Rubu/MoveStyles.html" title="Rubu::MoveStyles (module)">MoveStyles</a></span><small class='search_info'>Rubu</small></li><li><span class='object_link'><a href="Rubu/Order.html" title="Rubu::Order (class)">Order</a></span> < Object<small class='search_info'>Rubu</small></li><li><span class='object_link'><a href="Rubu/RubyCommand.html" title="Rubu::RubyCommand (class)">RubyCommand</a></span> < Move<small class='search_info'>Rubu</small></li><li><span class='object_link'><a href="Rubu/ShellCommand.html" title="Rubu::ShellCommand (class)">ShellCommand</a></span> < Move<small class='search_info'>Rubu</small></li><li><span class='object_link'><a href="Rubu/State.html" title="Rubu::State (class)">State</a></span> < Object<small class='search_info'>Rubu</small></li><li><span class='object_link'><a href="Rubu/Step.html" title="Rubu::Step (class)">Step</a></span> < Move<small class='search_info'>Rubu</small></li><li><span class='object_link'><a href="Rubu/StepAged.html" title="Rubu::StepAged (class)">StepAged</a></span> < Step<small class='search_info'>Rubu</small></li><li><span class='object_link'><a href="Rubu/StepAlways.html" title="Rubu::StepAlways (class)">StepAlways</a></span> < Step<small class='search_info'>Rubu</small></li><li><span class='object_link'><a href="Rubu/StepMark.html" title="Rubu::StepMark (class)">StepMark</a></span> < Step<small class='search_info'>Rubu</small></li><li><span class='object_link'><a href="Rubu/Trail.html" title="Rubu::Trail (class)">Trail</a></span> < Move<small class='search_info'>Rubu</small></li><li><span class='object_link'><a href="Rubu/Var.html" title="Rubu::Var (class)">Var</a></span> < Object<small class='search_info'>Rubu</small></li><li><span class='object_link'><a href="Rubu/Walk.html" title="Rubu::Walk (class)">Walk</a></span> < Trail<small class='search_info'>Rubu</small></li></ul>
|
54
54
|
|
55
55
|
</ul>
|
56
56
|
</div>
|
data/doc/file.CHANGELOG.html
CHANGED
@@ -63,14 +63,17 @@
|
|
63
63
|
|
64
64
|
<div id="content"><div id='filecontents'>
|
65
65
|
<h1 id="label-Version+history">Version history</h1>
|
66
|
-
<dl class="rdoc-list label-list"><dt>0.0.
|
66
|
+
<dl class="rdoc-list label-list"><dt>0.0.2
|
67
|
+
<dd>
|
68
|
+
<p>Documentation updates. Some name changes to Rubu classes.</p>
|
69
|
+
</dd><dt>0.0.1
|
67
70
|
<dd>
|
68
71
|
<p>Initial version.</p>
|
69
72
|
</dd></dl>
|
70
73
|
</div></div>
|
71
74
|
|
72
75
|
<div id="footer">
|
73
|
-
Generated on
|
76
|
+
Generated on Sun Jul 1 17:48:17 2018 by
|
74
77
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
75
78
|
0.8.7.6 (ruby-2.3.3).
|
76
79
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -69,7 +69,7 @@ is in practice a replacement for Make and Rake type of tools. <span class='objec
|
|
69
69
|
targeted to provide means for creating flexible build environments.</p>
|
70
70
|
|
71
71
|
<p>Make and Rake are rule and recipe based, and they are very effective when
|
72
|
-
the build process can be captured to these rules and
|
72
|
+
the build process can be captured to these rules and is fairly fixed.
|
73
73
|
<span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span> includes declarations which correspond to rules, but the
|
74
74
|
declarations are lower level and provide more control over the behavior.
|
75
75
|
<span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span> also provides direct control over when the rules are executed.</p>
|
@@ -77,16 +77,16 @@ declarations are lower level and provide more control over the behavior.
|
|
77
77
|
<p>Make and Rake are more compact for the simplest build environments, but
|
78
78
|
there is a break-even point where <span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span> becomes more convenient. This is
|
79
79
|
likely to happen when the user needs many exceptions to basic rules, also
|
80
|
-
when other tasks than just build
|
80
|
+
when other tasks than just build tasks are needed.</p>
|
81
81
|
|
82
82
|
<p><span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span> library can be used from any Ruby program, since it is just a
|
83
83
|
library. It can also be part of a larger program as less significant part
|
84
84
|
of the overall functionality. From maintenance point of view this can be a
|
85
85
|
win in many cases.</p>
|
86
86
|
|
87
|
-
<
|
88
|
-
|
89
|
-
|
87
|
+
<p>The easiest way to get started with <span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span> is to study examples (See:
|
88
|
+
“Example” chapter below). However for longer term the main concepts are
|
89
|
+
important as well (See: “Concepts” chapter below).</p>
|
90
90
|
|
91
91
|
<h2 id="label-Example">Example</h2>
|
92
92
|
|
@@ -99,7 +99,7 @@ win in many cases.</p>
|
|
99
99
|
files. The main file is hand written and the other file is generated with a
|
100
100
|
script. File generation is part of the build program.</p>
|
101
101
|
|
102
|
-
<p>
|
102
|
+
<p>Different execution variations of the build program is captured in:</p>
|
103
103
|
|
104
104
|
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_example'>example</span><span class='op'>/</span><span class='id identifier rubyid_runme'>runme</span>
|
105
105
|
</code></pre>
|
@@ -111,20 +111,267 @@ script. File generation is part of the build program.</p>
|
|
111
111
|
<span class='id identifier rubyid_runme'>runme</span>
|
112
112
|
</code></pre>
|
113
113
|
|
114
|
-
<p>Also take a look into the build program:</p>
|
114
|
+
<p>Also take a look into the build program itself:</p>
|
115
115
|
|
116
116
|
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_cat'>cat</span> <span class='id identifier rubyid_example'>example</span><span class='op'>/</span><span class='id identifier rubyid_bin'>bin</span><span class='op'>/</span><span class='id identifier rubyid_rubu_example'>rubu_example</span>
|
117
117
|
</code></pre>
|
118
118
|
|
119
119
|
<p>There are comments which highlight purpose of the build program content.</p>
|
120
120
|
|
121
|
+
<h2 id="label-Concepts">Concepts</h2>
|
122
|
+
|
123
|
+
<p><span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span> Build Program, RBP, is a Ruby program that uses the <span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span> library.
|
124
|
+
Typically command line options are accepted to give options for the build
|
125
|
+
process.</p>
|
126
|
+
|
127
|
+
<p>Build programs are about collecting source files and transforming them into
|
128
|
+
targets. This process is explicit in <span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span>. Each file, whether it's
|
129
|
+
source or target, is collected within the <span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span> build program. The files
|
130
|
+
are converted into <strong>Mark</strong> objects. Basically
|
131
|
+
<strong>Mark</strong> corresponds to a file, but it includes methods that
|
132
|
+
make the build process convenient.</p>
|
133
|
+
|
134
|
+
<p><strong>Step</strong> is build action that transforms source file(s) to
|
135
|
+
target file(s). For example, a C source file compilation is a
|
136
|
+
<strong>Step</strong> where one source file is converted to a corresponding
|
137
|
+
object file. <strong>Step</strong> is given source <strong>Mark</strong>
|
138
|
+
and target <strong>Mark</strong> as arguments. Hence this type of
|
139
|
+
<strong>Step</strong> a is one-to-one mapping.</p>
|
140
|
+
|
141
|
+
<p>Linking multiple objects to an executable is a many-to-one mapping. This is
|
142
|
+
performed by a <strong>Step</strong> where there are multiple sources and
|
143
|
+
one target, i.e. objects and the executable respectively.</p>
|
144
|
+
|
145
|
+
<p><strong>Step</strong> class (or object) has “step” method which includes
|
146
|
+
the <strong>Move</strong> that is needed to create the target.
|
147
|
+
<strong>Move</strong> is either a Shell or a Ruby command.
|
148
|
+
<strong>Move</strong> is executed only if necessary. Typically the
|
149
|
+
<strong>Step</strong> is sensitive to source being newer that the target,
|
150
|
+
just as with Make and Rake. However, it is possible to have a
|
151
|
+
<strong>Step</strong> that is sensitive to file content, for example.
|
152
|
+
Timestamp might change, but if the content is the same as previously, no
|
153
|
+
<strong>Move</strong> is made.</p>
|
154
|
+
|
155
|
+
<p><strong>Step</strong> is typically a simple command. In some cases
|
156
|
+
<strong>Step</strong> can include multiple <strong>Moves</strong>. These
|
157
|
+
can be performed in sequence or in parallel, with a multicore CPU.</p>
|
158
|
+
|
159
|
+
<p><strong>Trail</strong> is a collection of <strong>Steps</strong>.
|
160
|
+
<strong>Trail</strong> has a name, and it can be references by another
|
161
|
+
<strong>Trail</strong>. <strong>Trail</strong> can be sequential or
|
162
|
+
parallel. For example, C source to object compilation can be done in
|
163
|
+
parallel, but linking of objects to executable must occur after all objects
|
164
|
+
have been created.</p>
|
165
|
+
|
166
|
+
<p><span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span> Build Program includes all of the above, and the last step is to
|
167
|
+
select which <strong>Trail</strong> is executed. There should be at least
|
168
|
+
“default” <strong>Trail</strong>, and typically there is also a “clean”
|
169
|
+
<strong>Trail</strong>.</p>
|
170
|
+
|
171
|
+
<p><span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span> supports the configuration spaces: <strong>Order</strong>,
|
172
|
+
<strong>Var</strong>, and <strong>Info</strong>. <strong>Order</strong> is
|
173
|
+
meant to be used for controlling <span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span> itself. For example if user wants
|
174
|
+
to see all executed command, then “verbose” option should be selected.</p>
|
175
|
+
|
176
|
+
<p><strong>Var</strong> is used to control how <strong>Steps</strong> behave
|
177
|
+
and also details of <strong>Move</strong> internals. <strong>Info</strong>
|
178
|
+
is meant for runtime generated information. The division is semantic and
|
179
|
+
user might choose to combine everything to <strong>Var</strong> space, for
|
180
|
+
example.</p>
|
181
|
+
|
182
|
+
<p>To summarize and highlight the relationships between concepts, see the
|
183
|
+
diagram below:</p>
|
184
|
+
|
185
|
+
<pre class="code ruby"><code class="ruby">RBP => Trial+ => Step+ [s/p] => Move+ [s/p] => Source*, Target*
|
186
|
+
=> Order+
|
187
|
+
=> Var*
|
188
|
+
=> Info*
|
189
|
+
|
190
|
+
* = Zero or more
|
191
|
+
+ = One or more
|
192
|
+
s = Serial
|
193
|
+
p = Parallel</code></pre>
|
194
|
+
|
195
|
+
<p>RBP includes <strong>Trials</strong>, <strong>Orders</strong>, and possibly
|
196
|
+
<strong>Vars</strong> and <strong>Infos</strong>. <strong>Trial</strong>
|
197
|
+
includes one or more <strong>Steps</strong>, which can be executed in
|
198
|
+
sequence or in parallel.</p>
|
199
|
+
|
200
|
+
<p><strong>Step</strong> includes one or more <strong>Moves</strong>, and they
|
201
|
+
can also be sequential or parallel. <strong>Move</strong> has typically at
|
202
|
+
least one <strong>Source</strong> and at least one <strong>Target</strong>.
|
203
|
+
However, there are exceptions as well.</p>
|
204
|
+
|
205
|
+
<p>The suggested ordering within <span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span> Build Program is:</p>
|
206
|
+
<dl class="rdoc-list label-list"><dt>configuration
|
207
|
+
<dd>
|
208
|
+
<p>Process command line arguments and assign options that are used to control
|
209
|
+
the build process.</p>
|
210
|
+
</dd><dt>file collection
|
211
|
+
<dd>
|
212
|
+
<p>Collect source and target files either using Ruby with glob pattern, direct
|
213
|
+
references, or through manifest files. Convert file names to
|
214
|
+
<strong>Mark</strong> objects.</p>
|
215
|
+
</dd><dt>step definition
|
216
|
+
<dd>
|
217
|
+
<p>Define <strong>Steps</strong>. Inherit one of the <strong>Step</strong>
|
218
|
+
types (classes) and define at least the “step” method.</p>
|
219
|
+
</dd><dt>trail definition
|
220
|
+
<dd>
|
221
|
+
<p>Define <strong>Trails</strong>. Create all possible flows that user wants
|
222
|
+
to execute. Use hierarchy for your benefit in order to make RBP maintenance
|
223
|
+
as light as possible.</p>
|
224
|
+
</dd><dt>trail selection
|
225
|
+
<dd>
|
226
|
+
<p>Find the selected <strong>Trail</strong> or <strong>Trails</strong> and
|
227
|
+
execute.</p>
|
228
|
+
</dd></dl>
|
229
|
+
|
230
|
+
<h2 id="label-Configuration">Configuration</h2>
|
231
|
+
|
232
|
+
<p><strong>Order</strong> space default are set by the <span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span> library and user
|
233
|
+
can override the default based on command line parameters if needed.</p>
|
234
|
+
|
235
|
+
<p>Set default values for <strong>Var</strong> space. After default setting,
|
236
|
+
override the defaults with possible control from command line arguments.</p>
|
237
|
+
|
238
|
+
<p>Finally setup <strong>Trails</strong> by calling:</p>
|
239
|
+
|
240
|
+
<pre class="code ruby"><code class="ruby"><span class='const'>Trail</span><span class='period'>.</span><span class='id identifier rubyid_setup'>setup</span>
|
241
|
+
</code></pre>
|
242
|
+
|
243
|
+
<h2 id="label-File+collection">File collection</h2>
|
244
|
+
|
245
|
+
<p>If the build environment has clear and clean directory structure, it is
|
246
|
+
typically easiest to collect files programmatically. For example, to get
|
247
|
+
all C source files:</p>
|
248
|
+
|
249
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_cee_files'>cee_files</span> <span class='op'>=</span> <span class='const'>Mark</span><span class='period'>.</span><span class='id identifier rubyid_glob'>glob</span><span class='lparen'>(</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='const'>Var</span><span class='lbracket'>[</span><span class='symbol'>:source_dir</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>/*.c</span><span class='tstring_end'>"</span></span> <span class='rparen'>)</span>
|
250
|
+
</code></pre>
|
251
|
+
|
252
|
+
<p>This creates a list of <strong>Mark</strong> objects which are source
|
253
|
+
files. The corresponding object files can be created with “peer” method:</p>
|
254
|
+
|
255
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_obj_files'>obj_files</span> <span class='op'>=</span> <span class='id identifier rubyid_cee_files'>cee_files</span><span class='period'>.</span><span class='id identifier rubyid_peer'>peer</span><span class='lparen'>(</span> <span class='const'>Var</span><span class='lbracket'>[</span> <span class='symbol'>:build_dir</span> <span class='rbracket'>]</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.o</span><span class='tstring_end'>'</span></span> <span class='rparen'>)</span>
|
256
|
+
</code></pre>
|
257
|
+
|
258
|
+
<p>This method invocation takes an Array of <strong>Mark</strong> objects and
|
259
|
+
calls “peer” method for them. “peer” method changes the directory and
|
260
|
+
extension, and returns a new <strong>Mark</strong> object. In some cases
|
261
|
+
also the “basename” of the file is changed. This is achieved by giving the
|
262
|
+
“peer” method a third argument specifying the new “basename”.</p>
|
263
|
+
|
264
|
+
<h2 id="label-Step+definition">Step definition</h2>
|
265
|
+
|
266
|
+
<p><strong>Step</strong> is defined by inheriting of the <span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span>
|
267
|
+
<strong>Step</strong> classes and defining the custom “step” method. If a
|
268
|
+
specific setup for the <strong>Step</strong> is required, then an
|
269
|
+
additional “setup” method can be defined as well.</p>
|
270
|
+
|
271
|
+
<pre class="code ruby"><code class="ruby"><span class='kw'>class</span> <span class='const'>CleanUp</span> <span class='op'><</span> <span class='const'>StepAlways</span>
|
272
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_step'>step</span>
|
273
|
+
<span class='id identifier rubyid_shrun'>shrun</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rm -f </span><span class='embexpr_beg'>#{</span><span class='const'>Var</span><span class='lbracket'>[</span> <span class='symbol'>:build_dir</span> <span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>/*.o</span><span class='tstring_end'>"</span></span>
|
274
|
+
<span class='kw'>end</span>
|
275
|
+
<span class='kw'>end</span>
|
276
|
+
</code></pre>
|
277
|
+
|
278
|
+
<p>“setup” method is typically used to change the command according to user
|
279
|
+
configuration. “step” method is the action for <strong>Step</strong>.
|
280
|
+
<span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span> executes it, if necessary. For example, if <strong>Step</strong> is
|
281
|
+
a <strong>StepAged</strong> class, then the “step” method is only called if
|
282
|
+
the source <strong>Mark</strong> is newer than the target
|
283
|
+
<strong>Mark</strong>.</p>
|
284
|
+
|
285
|
+
<p>“step” method may include only one command or a set of commands. If one
|
286
|
+
command is needed, it can be simply executed:</p>
|
287
|
+
|
288
|
+
<pre class="code ruby"><code class="ruby"><span class='kw'>def</span> <span class='id identifier rubyid_step'>step</span>
|
289
|
+
<span class='id identifier rubyid_shrun'>shrun</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rm -f </span><span class='embexpr_beg'>#{</span><span class='const'>Var</span><span class='lbracket'>[</span> <span class='symbol'>:build_dir</span> <span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>/*.o</span><span class='tstring_end'>"</span></span>
|
290
|
+
<span class='kw'>end</span>
|
291
|
+
</code></pre>
|
292
|
+
|
293
|
+
<p>If there are multiple commands, then the commands can be grouped for
|
294
|
+
sequential (“walk”) or parallel execution (“fork”).</p>
|
295
|
+
|
296
|
+
<pre class="code ruby"><code class="ruby"><span class='kw'>def</span> <span class='id identifier rubyid_step'>step</span>
|
297
|
+
<span class='id identifier rubyid_fork'>fork</span> <span class='kw'>do</span>
|
298
|
+
<span class='id identifier rubyid_shuse'>shuse</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rm -f </span><span class='embexpr_beg'>#{</span><span class='const'>Info</span><span class='lbracket'>[</span> <span class='symbol'>:gen_files</span> <span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_rpath'>rpath</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
299
|
+
<span class='id identifier rubyid_shuse'>shuse</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rm -f </span><span class='embexpr_beg'>#{</span><span class='const'>Var</span><span class='lbracket'>[</span> <span class='symbol'>:build_dir</span> <span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>/*.o</span><span class='tstring_end'>"</span></span>
|
300
|
+
<span class='kw'>end</span>
|
301
|
+
<span class='kw'>end</span>
|
302
|
+
</code></pre>
|
303
|
+
|
304
|
+
<p>Note that the commands are defined with “shuse”. The logic is that we
|
305
|
+
don't execute the commands right away as in “shrun”. Instead we just
|
306
|
+
register the commands to the group. When the group definition is closed
|
307
|
+
(“end” keyword), it is complete, and we execute it either sequentially or
|
308
|
+
in parallel.</p>
|
309
|
+
|
310
|
+
<h2 id="label-Trail+definition">Trail definition</h2>
|
311
|
+
|
312
|
+
<p><strong>Trail</strong> is a collection of <strong>Steps</strong> or other
|
313
|
+
<strong>Trails</strong>, or a mix of both. For example, in order to compile
|
314
|
+
a set of C source files to object files, we might define:</p>
|
315
|
+
|
316
|
+
<pre class="code ruby"><code class="ruby"><span class='const'>Fork</span><span class='period'>.</span><span class='id identifier rubyid_form'>form</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>compile-cee</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span>
|
317
|
+
<span class='const'>GccCompileFile</span><span class='period'>.</span><span class='id identifier rubyid_usezip'>usezip</span><span class='lparen'>(</span> <span class='id identifier rubyid_cee_files'>cee_files</span><span class='comma'>,</span> <span class='id identifier rubyid_obj_files'>obj_files</span> <span class='rparen'>)</span>
|
318
|
+
<span class='kw'>end</span>
|
319
|
+
</code></pre>
|
320
|
+
|
321
|
+
<p>This creates a parallel (“Fork”) <strong>Trail</strong> called
|
322
|
+
“compile-cee”. Collection of <strong>Steps</strong> is created with
|
323
|
+
“usezip” method. “usezip” performs two operations: it creates a zip type
|
324
|
+
mix of “cee_files” and “obj_files”. The “zip” method of Ruby Array is used.
|
325
|
+
“zip” creates an Array of <strong>Mark</strong> pairs. Each pair is passed
|
326
|
+
to a “GccCompileFile” <strong>Step</strong> object. Finally we have a
|
327
|
+
collection of <strong>Steps</strong> which are executed in parallel when
|
328
|
+
“compile-cee” is invoked.</p>
|
329
|
+
|
330
|
+
<p>Here the defined <strong>Trail</strong> from above is referenced in order
|
331
|
+
to create a <strong>Trail</strong> for the complete compile flow:</p>
|
332
|
+
|
333
|
+
<pre class="code ruby"><code class="ruby"><span class='const'>Walk</span><span class='period'>.</span><span class='id identifier rubyid_form'>form</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>default</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span>
|
334
|
+
<span class='id identifier rubyid_pick'>pick</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>compile-cee</span><span class='tstring_end'>'</span></span>
|
335
|
+
<span class='const'>GccLinkExe</span><span class='period'>.</span><span class='id identifier rubyid_use'>use</span><span class='lparen'>(</span> <span class='id identifier rubyid_obj_files'>obj_files</span><span class='comma'>,</span> <span class='id identifier rubyid_exe_file'>exe_file</span> <span class='rparen'>)</span>
|
336
|
+
<span class='kw'>end</span>
|
337
|
+
</code></pre>
|
338
|
+
|
339
|
+
<p>This <strong>Trail</strong> definition defines that we want to first
|
340
|
+
execute “compile-cee” and then a <strong>Step</strong> which will create an
|
341
|
+
executable from object file collection. “GccLinkExe” <strong>Step</strong>
|
342
|
+
is called with “use” method, which will register the <strong>Step</strong>
|
343
|
+
to the enclosing <strong>Trail</strong>, “default”.</p>
|
344
|
+
|
345
|
+
<h2 id="label-Trail+selection">Trail selection</h2>
|
346
|
+
|
347
|
+
<p>The final stage in RBP execution is to use command line control for
|
348
|
+
selecting the executed <strong>Trails</strong> and then execute them. The
|
349
|
+
above definition (from previous section) is executed with:</p>
|
350
|
+
|
351
|
+
<pre class="code ruby"><code class="ruby"><span class='const'>Trail</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>default</span><span class='tstring_end'>'</span></span> <span class='rparen'>)</span>
|
352
|
+
</code></pre>
|
353
|
+
|
354
|
+
<h2 id="label-Final+notes">Final notes</h2>
|
355
|
+
|
356
|
+
<p><span class='object_link'><a href="Rubu.html" title="Rubu (class)">Rubu</a></span> treats single <strong>Mark</strong> objects and Array of
|
357
|
+
<strong>Mark</strong> objects the “same” way. In practice this means that
|
358
|
+
the most common methods for <strong>Mark</strong> objects are implemented
|
359
|
+
for Array as well. Hence, you can call a <strong>Mark</strong> method for
|
360
|
+
an Array, and they will actually be applied for each individual
|
361
|
+
<strong>Mark</strong> in the collection.</p>
|
362
|
+
|
363
|
+
<p><strong>Step</strong> has sources and targets. Even if a step has only one
|
364
|
+
source and one target, the actual container is an Array. If you want to
|
365
|
+
refer to the source, i.e. the only existing source, you can use the
|
366
|
+
“source” method. Same applies to targets (i.e. use the “target” method).</p>
|
367
|
+
|
121
368
|
<h2 id="label-Testing">Testing</h2>
|
122
369
|
|
123
370
|
<p>For this version, example is the testcase.</p>
|
124
371
|
</div></div>
|
125
372
|
|
126
373
|
<div id="footer">
|
127
|
-
Generated on
|
374
|
+
Generated on Sun Jul 1 17:48:17 2018 by
|
128
375
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
129
376
|
0.8.7.6 (ruby-2.3.3).
|
130
377
|
</div>
|