I just committed tools/remake.d. What it does in a nutshell is this:

it lets you add a call in your main.d file, along the lines of

  checkRemake(args, "path/to/source/file.d");

checkRemake invokes gdc (or a compiler of choice, via string Compiler), in 
verbose mode, to generate a list of imports, then filters out Phobos files 
(that part could probably use some work). Then it checks each of those files to 
see if they're newer than the corresponding obj/ file, and if yes, rebuilds 
them.

Finally, if any object files were rebuilt, it links a new binary, calls the 
destructors, and invokes it.

Designed to run on Unix-based systems, you might find it useful for developing 
server-side scripts in D, as it lets you just edit a webpage's D source and 
reload in the browser to trigger an incremental rebuild.

Thoughts?

PS: source http://svn.dsource.org/projects/scrapple/trunk/tools/tools/remake.d

Reply via email to