www.digitalmars.com

D Programming Language 2.0


Last update Sun Jul 20 19:38:22 2008

rdmd

Synopsis

In a command prompt:
% cat myprog.d
import std.stdio;
void main() 
{
    writeln("Hello, world without explicit compilations!"); 
}
% rdmd myprog
Hello, world without explicit compilations!
% _
Inside a D program:
% cat myprog.d
#!/usr/bin/rdmd
import std.stdio;
void main() 
{
    writeln("Hello, world with automated script running!"); 
}
% ./myprog.d
Hello, world with automated script running!
% _
(Under Windows replace cat with type and #!/usr/bin/rdmd with #!rdmd, the latter assuming that rdmd can be found in your path. But first see the "Bugs" section below.)

Description

rdmd is a companion to the dmd compiler that simplifies the typical edit-compile-link-run or edit-make-run cycle to a rapid edit-run cycle. Like make and other tools, rdmd uses the relative dates of the files involved to minimize the amount of work necessary. Unlike make, rdmd tracks dependencies and freshness without requiring additional information from the user.

rdmd:

Usage

rdmd [dmd and rdmd options] progfile[.d] [program arguments]

In addition to dmd's options, rdmd recognizes the following:

--chatty
write dmd commands to stdout before executing them
--compiler=/path/to/compiler
use the specified compiler (e.g. gdmd) instead of dmd
--dry-run
do not compile, just show what commands would be run (implies --chatty)
--force
force a rebuild even if apparently not necessary
--help
show a help message and exit
--man
open web browser on manual page

BUGS

Currently not compiling under Windows because it uses popen, which has not been emulated under D yet.

Download

Author

Andrei Alexandrescu