It has been a long time in coming, but we finally have a new version
of Rake available.
== Changes
* Fixed bug where missing intermediate file dependencies could cause
an abort with --trace or --dry-run. (Brian Chandler)
* Recursive rules are now supported (Tilman Sauerbeck).
* Added tar.gz and tar.bz2 support to package task (Tilman Sauerbeck).
* Added warning option for the Test Task (requested by Eric Hodel).
* The jamis rdoc template is only used if it exists.
* Added fix for Ruby 1.8.2 test/unit and rails problem.
* Added contributed rake man file. (Jani Monoses)
* Fixed documentation that was lacking the Rake module name (Tilman
Sauerbeck).
== What is Rake
Rake is a build tool similar to the make program in many ways. But
instead of cryptic make recipes, Rake uses standard Ruby code to
declare tasks and dependencies. You have the full power of a modern
scripting language built right into your build tool.
== Availability
The easiest way to get and install rake is via RubyGems ...
gem install rake (you may need root/admin privileges)
Otherwise, you can get it from the more traditional places:
Home Page:: http://rake.rubyforge.org/
Download:: http://rubyforge.org/project/showfiles.php?group_id=50
== Thanks
Lots of people provided input to this release. Thanks to Tilman
Sauerbeck for numerous patches, documentation fixes and suggestions.
And for also pushing me to get this release out. Also, thanks to
Brian Chandler for the finding and fixing --trace/dry-run fix. That
was an obscure bug. Also to Eric Hodel for some good suggestions.
-- Jim Weirich
--
-- Jim Weirich j...@weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
> = Rake 0.5.0 Released
>
> It has been a long time in coming, but we finally have a new version
> of Rake available.
Did you improve the introductory documentation?
I tried to use Rake once, and I could not get it to execute a command if a
file had changed. That could just be me.
--
Phlip
http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces
Hi Phlip!
> Jim Weirich wrote:
> > It has been a long time in coming, but we finally have a new version
> > of Rake available.
>
> Did you improve the introductory documentation?
Only minor tweaks to the docs this time around.
> I tried to use Rake once, and I could not get it to execute a command if a
> file had changed. That could just be me.
Hmmm ... where did you have problems? I'm always looking for ways to improve
rake, including the documentation.
> = Rake 0.5.0 Released
>
> It has been a long time in coming, but we finally have a new version
> of Rake available.
Thanks a lot for this wonderful tool.
I have code in my Rakefile for uploading releases to RubyForge so that
they will correctly appear under the project's file release page.
(E.g. http://rubyforge.org/frs/?group_id=559)
I've however not factored this out into a separate task. Would you still
be interested in this?
> I have code in my Rakefile for uploading releases to RubyForge so that
> they will correctly appear under the project's file release page.
> (E.g. http://rubyforge.org/frs/?group_id=559)
>
> I've however not factored this out into a separate task. Would you
> still be interested in this?
I am!!! I was just gonna write this soon.
GIMME! :)
I've attached the whole file (used for ruby-breakpoint, BTW) as that
particular task depends on the presence of a few constants and other
data. You'll probably want to refactor that a bit so that it works in
your Rakefile as well, but the basic logic should still apply.
The task that does the RubyForge file publishing is :publish_files.
If you're going to refactor this into a general task it would be
wonderful if you could contribute it to Jim, by the way.
> > I tried to use Rake once, and I could not get it to execute a command if
a
> > file had changed. That could just be me.
>
> Hmmm ... where did you have problems? I'm always looking for ways to
improve
> rake, including the documentation.
Here:
'file.exe' => ['file.cpp', 'file.h']
`cc file.cpp`
Run the cc line if .cpp or .h changed.
All documentation everywhere has this problem. The author takes something
for granted and the reader misses it.
I went with this:
if make('file.exe', ['file.cpp', 'file.h']) then
`cc file.cpp`
end
make() just reports true if any of its right arguments have a greater file
mod time than its first argument. The problem with that technique is it uses
no elaborate blocks or => marks, or Rake.
--
Phlip
http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces
If that's all you need, go for it. The original version of Rake was under 100
lines of code, so obviously plain old Ruby is very close to solving the
problem without using Rake.
But, your simple example can be rendered in Rake as ...
file "file.exe" => ['file.cpp', 'file.h'] do
sh %{cc file.cpp -o file.exe}
end
> I've attached the whole file (used for ruby-breakpoint, BTW) as that
> particular task depends on the presence of a few constants and other
> data. You'll probably want to refactor that a bit so that it works in
> your Rakefile as well, but the basic logic should still apply.
Oh my. First of all, congratulations to Florian for figuring out how
to maneuver through all of the HTML forms to automate this task. ;)
Having said that, though, this seems to highlight the fact that we
could really use some kind of simple (and more direct) API for making
file releases at RubyForge. Here is one support request that addresses
the problem:
http://rubyforge.org/tracker/index.php?func=detail&aid=531&group_id=5&atid=104
and there may be others.
Whee-oo! That's been on my list to do for sourceforge for a long time,
but now your code is one more reason to switch to the increasingly
superior RubyForge. Thanks!
Very true, very true... XML-RPC or SOAP or something would be nice.
Hey, SFTP's working now (thx to Brian Candler), so anything can happen!
Yours,
Tom
> But, your simple example can be rendered in Rake as ...
>
> file "file.exe" => ['file.cpp', 'file.h'] do
> sh %{cc file.cpp -o file.exe}
> end
Is that the complete Rakefile?
--
Phlip
http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces
Complete enough to build the file.exe upon request (e.g. "rake file.exe" from
the command line). If you wish to make file.exe the default target (so that
a plain "rake" one the command line will work), you can add the following
line ...
task :default => ["file.exe"]
> > > file "file.exe" => ['file.cpp', 'file.h'] do
> > > sh %{cc file.cpp -o file.exe}
> > > end
> >
> > Is that the complete Rakefile?
>
> Complete enough to build the file.exe upon request (e.g. "rake
file.exe" from
> the command line). If you wish to make file.exe the default target
(so that
> a plain "rake" one the command line will work), you can add the
following
> line ...
>
> task :default => ["file.exe"]
You need someone as brain-damaged as me to help you improve the manual.
I couldn't make that connection from reading the intro, and the stuff
for 'task' and 'file'.
The next time I need my make() function I will instead use Rake, to
force it to grow on me.
--
Phlip