Last update March 7, 2012


Note: dmake has been largely replaced with the build utility at DsourceProject:build

dmake is a small commandline utility (<900 lines of D) that can be used to build applications and to develop freely within a system of unified source trees without thinking about library or project borders. Basically you enter "dmake mainsource" and dmake does the rest, it analyzes all import statements recursively and passes all necessary files to dmd to compile and/or link.

Goal statement:

  • dmake is built for quick, easy and open development in the community. Target groups: people who want to share their sources seemlessly, people who want to learn and work their way into D.

dmake sourcefile
dmake sourcefile [dmake options] [all other options passed to dmd]

dmake options:

-v (verbose, also passed through to dmd)
-build (compile and link all files)
-gui (add some common options for linking windows gui applications)

Project data:

  • Status: late alpha, early beta
  • License: Open Source,
  • Sources used: substancial parts of Burton Radons digc have been used as a starting point
  • Published: first published version 0.21, 27 Sep 04
  • Maintainer: HelmutLeitner, MAIL helmut.leitner (AT)

  • dmake is both for Windows and Linux
  • dmake doesn't need a makefile, it analyzes the sources directly starting from the sourcefile. This does not have to be a file containing main() but it is assumed to be the top-level file.
  • dmake optimizes calls to dmd, only those source are compiled that are somehow outdated
  • dmake reads the configuration file for the standard import roots, otherwise use dmd -I options.
    • (Windows: c:/dmd/bin/sc.ini, Linux: /etc/dmd.conf)
  • dmake passes all unknown options to dmd, so you can use all dmd options as usual
  • dmake resolves cyclic dependencies

  • The dmd configfiles must be in the standard locations.
    • Windows: c:\dmd\bin\sc.ini (this will be configurable in the next revision)
    • Linux: /etc/dmd.conf
  • The configfile DFLAGS options must not (Windows) contain a reference to the relative dmd path (%@P%). Replace this with absolute paths.
  • The sourcefiles have to be aligned. To work correctly, dmake must be able to find sourcefiles from their module names. So all (almost all) files must be "aligned" to one of the source trees. That means their paths, e.g. "c:\d\project\mod\foo.d" must be a kind of concatenation consisting of one of the import roots (e. g. "c:\d") and the import module names (e.g. "import;").

  • you can create projects and examples very quickly
  • you needn't care for D-libraries, library borders, project borders
  • in a certain setting you can do code harvesting (move modules and functions around the source tree) without a need to update anything (makefiles, libraries, ...)

  • dmake will not (yet) help you to create libraries, if you want to do that, use digc
Known possible problems:

  • Linux-dmd doesn't seem to support a response file, so currently all filenames are passed to dmd on the command line. So there is a practical limit to the number of files in the application depending on their accumulated path lengths (maybe 100-200 files). But before someone gets near that limit, the problem will have been solved.
  • dmake currently ignores Phobos sources by matching file paths to /phobos/ (or \phobos\ respectively) . It leaves it to dmd to resolve that from its library. If someone wants to do active Phobos development, dmake should be enhanced to support that by turning this feature off and solving all related problems.
  • dmake will currently not read configuration files from nonstandard locations (in that case you have to use dmd -I options to tell dmake where to search).

  • I promise to quickly (within a few days) resolve any problems that are reported to me.
  • I promise to accept enhancements unbureaucratically
  • Problems or suggestions can be reported here, in the newsgroup, or by e-mail: MAIL helmut.leitner (AT)
Download and build:


  • dmake vs.0.21 (Sep 27, 2004) the first published version.
-- HelmutLeitner


Q. How does digc and dmake compare:

A. First, dmake uses substancial parts from digc - Thank you, Burton Radons! If the features of dmake become popular, I'm sure Burton will join its features into digc, and I'll be happy to support that. Currently dmake is a stripped down spike that follows a quite different philosophy.

Comparison chart:

statusreliable productlate alpha / early beta
philosophymake library building and using easyforget about library building and using
goalsto support the creation of proprietary and professional library products and projects that use these librariesto support easy code reuse across the traditional borders of libraries and projects and for easy change of these structures
target groupseverybody, especially professionalscommunity projects, newcomers, especially those that want to reuse and share code with a minimum of effort

Automatic subpage listing

2 pages:date of last change
Dmake/PreparingVs022October 16, 2004 10:45
Dmake/NextReleaseSeptember 28, 2004 11:14

Patched versions on the web

If somebody creates a patched dmake version and wants to publish it on the web, this is the place to list it:

  • ...

  • others can find and test it easily
  • and we can discuss and pick features for the next dmake revision


Put feedback here.

If related directly to the next dmake revision, use Dmake/NextRelease.

FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: March 7, 2012 20:23 (diff))