On Friday, 3 April 2015 at 17:59:22 UTC, Atila Neves wrote:
Well, I took your advice (and one of my acceptance tests is
based off of your simplified real-work example) and started
with the low-level any-command-will-do API first. I built the
high-level ones on top of that. It doesn't seem crazy to me
that certain builds can only be done by certain backends. The
fact that the make backend can track C/C++/D dependencies
wasn't a given and the implementation is quite ugly.
In any case, the Target structs aren't high-level abstractions,
they're just data. Data that can be generated by any code. Your
example is basically how the `dExe` rule works: run dmd at
run-time, collect dependencies and build all the `Target`
instances. You could have a D backend that outputs (then
compiles and runs) your example. The "only" problem I can see
is execution speed.
Maybe I didn't include enough examples.
I also need to think of your example a bit more.
I may have misunderstood how it works judging only by provided
examples. Give a me bit more time to investigate actual sources
and I may reconsider :)