Modules/packages correspondence to file system

BCS BCS at pathlink.com
Mon Jul 24 07:44:50 PDT 2006


Chris Nicholson-Sauls wrote:
> BCS wrote:
> 
>>
>> I have some builds that have more non-D than D parts.
> 
> Depending on the details, you should be fine with BRF (Build Response 
> File) and properly set up RDF (Rules Definition File) entry for the 
> non-D parts.
> 
>> I have some builds that need the same file to be compiled several 
>> times under different version settings.
> 
> Now that's a tough one.  Could use a batch to explicitly compile that 
> module a few times, with the different settings, followed by an 
> invocation to build, and include in your BRF a directive to ignore that 
> module.  Still a little much though.
> 
> 
> -- Chris Nicholson-Sauls

Build is good for what it does, mostly D projects that might have a few 
non D parts. But it seems a bit clumsy when things start getting more 
complicated.

I just had a neat thought, build figures out all of the dependencies of 
a build, could it be made to generate a makefile that will have the same 
effect?

</input>
<code file="foo.d">
import bar;
</code>

<code file="bar.d">
import baz;
</code>

<code file="baz.d">
...
</code>
</input>

<output>
foo	: foo.o bar.o baz.o
	dmd foo.o bar.o baz.o $(D_LINK)

foo.o	: foo.d bar.d baz.d
	dmd -c foo.d

bar.o	: bar.d baz.d
	dmd -c bar.d

baz.o	: baz.d
	dmd -c baz.d
</output>




More information about the Digitalmars-d mailing list