"Jacob Carlborg" <d...@me.com> wrote in message news:itpn8m$1c1i$1...@digitalmars.com... > > "target" works like this: > > 1. You call "target" passing in the name of the target and a block > > 2. "target" then call the block passing in an instance of a Target class > (or similar) > > 3. In the block you then specify all the necessary settings you need for > this particular target. > > You should only call "target" once for each target. So, if you pass in > "name2" instead of "name" you would create a new target. I haven't figured > out what should happen if you call "target" twice with the same name. > > Also note that this would be sufficient: > > target "name" do > flags "-l-lz" > end > > In that case you wouldn't even have to care about "t" or that it even > exists an instance behind the since. It would just be syntax. > > You can have a look at how Rake and Rubgems do this: > > If you look at the Rake examples: > http://en.wikipedia.org/wiki/Rake_%28software%29 then a target would work > the same as a Rake task. > > Have a look at the top example of: > http://rubygems.rubyforge.org/rubygems-update/Gem/Specification.html >
FWIW, I've been using Rake heavily on a non-D project for about a year or so, and the more I use it the more I keep wishing I could just use D instead of of Ruby. That may have a lot to do with why I'm so interested in seeing Dake use D. Of course, I realize that Dake isn't Rake and isn't going to be exactly the same, but it's still Ruby instead of D and that's proven to be the #1 issue that I have with Rake.