DDT 0.11.0 released
Rikki Cattermole via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Tue Mar 24 06:50:27 PDT 2015
On 25/03/2015 2:24 a.m., Bruno Medeiros wrote:
> On 23/03/2015 15:35, Ben Boeckel via Digitalmars-d-announce wrote:
>>>> Running a Python script to generate D code?
>>>
>>> Yes, in DUB you can run arbitrary external commands before and after the
>>> D sources compilation.
>>
>> But not in between? Basically, can you have a tool written in D built
>> with the project and then used to generate code in the same project?
>>
>> --Ben
>>
>
> That should be possible if you split it into two bundles or so, if I
> understood that case correctly. The external commands run before and
> after a compilation of a bundle (known in DUB as "package"). So you
> could have:
>
> 1. bundleA - pre external commands
> 2. bundleA - D sources compilation
> 3. bundleA - post external commands
> 4. bundleB - pre external commands
> 5. bundleB - D sources compilation
> and so on.. (if bundleA is set as a dependency of bundleB)
Actually I was thinking along the lines of using sub packages to do this.
package:
depends on subPackage2
subPackage1:
pre: do stuff
compile D
post: do stuff
subPackage2:
depends on subPackage1
pre: do stuff
compile D
post: do stuff
Of course you could chain this as long as you want.
More information about the Digitalmars-d-announce
mailing list