On 2011-10-26 12:26, Gor Gyolchanyan wrote:
I had a few thoughts about integrating build awareness into DMD.
It would be really cool to add a flag to DMD to make it compile and
link in all import-referenced modules.
Also, it would be awesome to store basic build information in modules
themselves in the form of special comments (much like documentation
comments), where one could specify external build dependencies, output
type, etc.
There would be no need for makefiles and extra build systems. You'd
just feed an arbitrary module to the compiler and the compiler would
build the target, to which that module belongs (bu parsing build
comments and package hierarchies).
Wouldn't this be a good thing to have?
Sounds horrible to have a build script in comments in the source code. I
think the right approach is to have a separate build tool, with a proper
DSL built on an existing language, e.g. Ruby, D, something else.
There are already a couple of build tools available:
DSSS - D1 only, not maintained any more
xfbuild - Probably not maintained any more. No build script
rdmd - Cannot build libraries, no build script, cannot do much besides
from building executables
I've been working on a build tool, https://bitbucket.org/doob/dake .
I've started rewriting the tool in D, been a while since I worked on it.
Currently it's not a prioritized project for me.
I also know others are working on built tools for D.
--
/Jacob Carlborg