Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > [ANN] Rant 0.3.6

Thread Tools

[ANN] Rant 0.3.6

Stefan Lang
Posts: n/a
Rant is a flexible build tool written entirely in Ruby,
similar to Rake.

== What's new in this release?

* Automatic cleanup of generated files
* Directed rules
* Constraining variables
* rant-import searches $LOAD_PATH
* Immediately build targets from Rantfiles

I'd appreciate suggestions about new features, names, etc.

== Installing Rant

You can install Rant as a RubyGem:
* * % gem install --remote rant

or download the package from RubyForge(
and install with install.rb:
* * % ruby install.rb

== More about Rant

The equivalent to a Makefile for make is the Rantfile. An
Rantfile is actually a valid Ruby script that is read by the
rant command.

Rant currently features:
* Defining custom tasks
* Automated packaging, testing and RDoc generation for Ruby
* applications and libraries.
* Primitive support for compiling C# sources portably with csc, cscc
* and mcs.
* Multiple buildfiles (e.g. one per directory).
* A configure plugin for easy environment and build-parameter
* checking (but not like autoconf!) which saves data in a yaml file.
* The rant-import command creates a monolithic rant script,
* so you don't depend on an rant installation anymore.

The following Rantfile solves the problem posted by Mark Probert.
Consider the following structure:
* Rantfile
* foo
* src_a/
* * a_1.c
* * a_2.c
* src_b/
* * b_1.c
* * b_2.c
* obj/
* * a_1.o
* * a_2.o
* * b_1.o
* * b_2.o

The Rantfile could look like:

import %w(directedrule autoclean)

desc "Build foo."
file :foo => "obj/libfoo.a" do |t|
sys "cc -o #{} #{t.source}"

gen Directory, "obj"

ro = gen DirectedRule, "obj" => sys["src_*"], => :c do |t| "obj"
sys "cc -c -o #{} #{t.source}"

file "obj/libfoo.a" => ro.candidates do |t|
sys "ar cr #{} #{t.prerequisites.arglist}"
sys "ranlib #{}"

desc "Cleanup."
gen AutoClean, :clean

Running rant:
% rant --tasks
rant foo # Build foo.
rant clean # Cleanup.
% rant
mkdir obj
cc -c -o obj/a_1.o src_a/a_1.c
cc -c -o obj/a_2.o src_a/a_2.c
cc -c -o obj/b_1.o src_b/b_1.c
ar cr obj/libfoo.a obj/a_1.o obj/a_2.o obj/b_1.o
ranlib obj/libfoo.a
cc -o foo obj/libfoo.a
% rant clean
rm -rf obj
rm -f foo

== Resources

Current docs::
Rubyforge page::


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
/rant CRAP ADSL /rant XPD NZ Computing 17 04-27-2007 08:00 AM
OT: <Rant> .... </Rant> forum Digital Photography 0 02-15-2006 08:39 AM
*RANT* Ridiculous EDA software "user license agreements"? license_rant_master VHDL 37 04-29-2005 03:48 PM
spam increasing? <rant></rant> T.N.O. NZ Computing 9 11-21-2003 09:57 AM
Re: Rant: VHDLisms Jos De Laender VHDL 0 08-23-2003 08:45 PM