shebang launcher for D programs

Andrei Alexandrescu (See Website For Email) SeeWebsiteForEmail at erdani.org
Wed Mar 21 12:26:07 PDT 2007


Anders F Björklund wrote:
> Andrei Alexandrescu (See Website For Email) wrote:
> 
>> In short, rundmd does what rdmd does but works on multi-module programs.
>>
>> I suspect other people have written similar scripts, but just in case, 
>> I thought I'd ask. If people are interested, I'll be glad to comb the 
>> script a little and post it here.
> 
> Rebuild has a similar feature (-exec), but it's a program not a script.
> I think build/bud also did, but I had problems with it and GDC/Tango...

Sounds great. Where is rebuild? (Bud aka build is easy to find on 
dsource.org).

> Not sure how you pass runtime / program arguments over to it, though ?
> But it does parse and compile all the imported modules for the program.

(The way I do it is simple but ambiguous - any flags that come before 
the program name are passed to dmd, and any stuff that comes after the 
program name is considered that program's arguments. The program name is 
the first thing without a leading "-".)

I think such a tool should be part of the standard distribution - it's 
very, very useful.


Andrei



More information about the Digitalmars-d mailing list