Header Files

Ali Çehreli via Digitalmars-d digitalmars-d at puremagic.com
Sat May 9 18:09:33 PDT 2015


On 05/09/2015 07:01 AM, bitwise wrote:
> ./main.d
> ./pack/foo.d
> ./pack/sub/bar.d
>
> dmd main.d pack/foo.d pack/sub/bar.d -ofTest -H
>
> This dumps all the *.di files into the output directory ignoring the
> directory structure.
>
> Is there some rational for it being this way?
> Wouldn't it be much more useful if directories were preserved?
>
>    Bit

As far as I know, every other similar tool works the same way:

   $ gcc -c foo/foo.c

foo.o is outputted to the current directory.

The common solution that I know is to use makefiles to manage file 
dependencies. For example, the rule for .di specifies the file that it 
depends on (the .d corresponding to that .di) and 'make' handles it 
automatically.

Ali



More information about the Digitalmars-d mailing list