Button: A fast, correct, and elegantly simple build system.

Kagamin via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Fri Jun 17 02:49:21 PDT 2016


On Friday, 17 June 2016 at 04:54:37 UTC, Jason White wrote:
>> Why the build script can't have a command line interface?
>
> It could, but now the build script is a more complicated and 
> for little gain.

It's only as complicated to implement required features and not 
more complicated. If the command line interface is not needed, it 
can be omitted, example:
---
import button;
auto Build = ...
mixin mainBuild!Build; //no CLI
---

> Adding command line options on top of that to configure the 
> build would be painful.

$ rdmd build.d configure [options]

Well, if one wants to go really complex, a prebuilt binary can be 
provided to help with that, but it's not always needed I think.

> It would be simpler and cleaner to write a D program to 
> generate the JSON build description for Button to consume. Then 
> you can add a command line interface to configure how the build 
> description is generated. This is how the Lua build 
> descriptions work[1].

---
import button;
auto Build = ...
mixin mainBuildJSON!Build;
---
Should be possible to work like lua script.


More information about the Digitalmars-d-announce mailing list