Such things should of course be told to the compiler somehow. By using
the project configuration, or by other means. (It's only a matter of
definition.)
maybe like delphi did it
there is a file called .dpr (delphi project)
which holds the absolute/relative pathes for in project used imports
it could be seen as an delphi source based makefile
test.dpr
---
project test;
uses // like D's import
unit1 in '\temp\unit1.pas',
unit2 in '\bla\unit2.pas',
unit3 in '\blub\unit3.pas',
...
---
unit1.pas
---
uses
unit2,
unit3;
interface
...
implementation
...
---
and the sources files .pas compiled into an delphi compiler specific
"object file format" called .dcu (delphi compiled unit)
which holds all intelligent data for the compiler when used serveral
times (if the compiler finds an .dcu he will use it, or compile the .pas
if needed to an .dcu)
i think that, the blasting fast parser (and the absence of generic
programming features) makes delphi the fastest compiler out there
the compiling speed is compareable to sending a message through icq or
save a small file
did the dmd compiler have rich compile/linktime intermediate files?
and btw: if we do compiletime bechmarks - delphi is the only hart to
beat reference
but i still don't like delphi :-)