[Rant] rant -n

Stefan Lang langstefan at gmx.at
Sat Oct 22 18:55:40 EDT 2005

Forwarded message:

On Saturday 22 October 2005 10:45, Barrie Stott wrote:
> A quick question for you: do you intend to add a -n option to rant
> so that a dry run can be performed? It's something make has and,
> when I'm struggling a bit to find what is happening, it's often
> been useful.

Yes, rant will have such an option, but it can't work exactly
like "make -n", since a task action can contain arbitrary Ruby
code. It could look something like the following:


    task :a => "foo" do
        puts "built programs"

    file "foo" => ["foo.c", "foo.h"] do |t|
        sys "gcc", "-o", t.name, t.source

Running rant with "dry run" option:

    % rant -n
    Invoking "a"
    Invoking "foo" ("foo.c" requires update)
    Executing "foo"
    Executing "a"

Assuming "foo" was built correctly:

    % rant -n
    Invoking "a"
    Invoking "foo"
    Executing "a"

A first version of this feature will probably come with one of
the next two releases. If you have suggestions/ideas, let me know.

Kind regards,

More information about the make-cafe mailing list