www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - reggae v0.2.3: minimal build, reggae as a library

https://github.com/atilaneves/reggae

Ask, and ye shall receive:

Stick -version=minimal when building reggae itself (or use the 
minimal_bootstrap.sh in the repo) and reggae has no dependencies 
on anything. All it can do then is D builds and the only backend 
is the binary one. No dub support either.

Don't want to build reggae / dub run reggae / run it as a 
command-line tool? Run this:

REGGAE=/path/to/reggae/repo
rdmd -I/$REGGAE/src -I$REGGAE/payload -J$REGGAE/payload/reggae 
-version=reggaelib /path/to/your/reggaefile.d -b <backend> 
<project dir>

Now you have a build wherever you ran that from. Your build 
description... becomes reggae itself. To my surprise, you can add 
-version=minimal to that command line and it seems to work.

I know, I know, there're loads of flags there right now. It's the 
best I could come up with without even more massive amounts of 
refactoring. It's silly you still have to specify `-b binary` 
when you've built a version that doesn't know how to do anything 
else, but... them's the breaks right now.

I've only tried -version=reggaelib on a toy build system and 
reggae itself. But it "ourobourosed" nicely. So I'm assuming it 
works, but it might not. I was a bad programmer and only tested 
any of this manually.

-version=reggaelib only works if the `build` template mixin was 
used, which it probably always should. But... there's no change 
needed to any exiting build description, just -version=reggaelib 
(basically the template mixin expands to something else) and 
voila.

Atila
Jun 10 2015