On Monday, 2 February 2015 at 21:55:21 UTC, Jonathan M Davis
wrote:
I've long thought that it some point, dub would be forced to
support
arbitrary build systems in order to actually work in the
general case. There
are far too many special cases and more complicated things that
build
scripts and the like frequently have to deal with for dub's
simple approach
to work in many cases. Just look at what something like cmake
it can do. It
blows dub out of the water when it comes to power.
The fact that we have package management via dub is great, and
the way it
builds stuff works for many common cases (especially when
you're talking
about libraries), but I really don't think that its build
system is powerful
enough for the long run. I doubt that Sonke has time to deal
with it given
how much is on his plate, but we really need to look at making
it so that
dub supports a much more powerful build system - possibly even
making it so
that it can support projects building with existing build
systems such as
cmake. I'm sure that that sort of thing comes with its own
types of
problems, but what dub does right now is just too simplistic.
A prime example that I've wondered about is how to deal with
cases where you
need to create a C or C++ wrapper for something and use it in
your project.
If dub supported makefiles, then that would be trivial, but as
it stands, it
can't do anything even close to that. Anything that's C or C++
has to
already be built no the target system, be in a standard
position for the
linker to find it, etc., or you can't use it in a dub project.
Given our
need for C/C++ compatability, I think that that's a serious
flaw. Dub is
new, and we've gotten by thus far with what it can do, but if
it's going to
really be our standard build system for D, it needs to improve
by quite a
bit.
- Jonathan M Davis
I think it's the moment to point out the latest P.R. merged into
dub:
https://github.com/D-Programming-Language/dub/pull/489
It does support Makefiles in a way (prebuiltcommand), but I agree
it's rather simplistic.