[Rake-devel] hello

Bennett, Patrick Patrick.Bennett at inin.com
Tue Feb 3 16:16:13 EST 2004


I've been putting a lot of work into a higher level build system using
rake as the foundation.
I've modeled it somewhat on Boost-Buildv2 and its use of generic
'features' that can be applied across multiple tools.

I've already changed rake a bit to handle recursive rakefiles.
I made it simply collect subdir('xxxx','yyyy') references into a global
array, and pull rakefiles (starting with the rakefile found the usual
way) off this array.
For each new rakefile, it clears all existing tasks except those with a
particular option set on them [another extension].  I use this so I can
maintain global header dependency tasks (across multiple rakefiles) that
were auto-generated from C++ source files.

Here's an example rakefile in my system

exe :testapp, allCPPSource, debug, define('DEF_FOR_DEBUG')
exe :testapp, allCPPSource, release, define('DEF_FOR_RELEASE')

Which would compile all *.cpp files in the current directory for Win32
(using msvc), Linux (using gcc), using defaults for a debug build and
for a release build.
The debug build would #define DEF_FOR_DEBUG and the release build would
#define DEF_FOR_RELEASE.
The appropriate flags would automatically be used for each compiler and
for the various build options.  Multi-threaded, debug-symbols, etc.
It would also automatically scan the .cpp files for #include references
and based on the 'standard' #include paths, recursively walk the
#include dependencies.  These header references would be added as
persistent 'header' tasks.

A shared library (.dll/.so) is as simple as
dll :mylib, allCPPSource
(not specifying a platform (linux32, win32), or build-set (debug,
release), just defaults to the standard set (both debug/release, and
linux32/win32).

I've defined a lot more as well, but it gets into specifics with my
company's build structure.  Things like 'publishing' libraries for use
by other modules, and linking against those libraries from other trees
simply using a 'friendly' name.  A scoreboard html file is also created
that color codes warnings/errors and separates the output into
individual hotlinked compilation pieces.

If there's specific info you guys would like to know about, holler.

Once I'm all done, I'll see if my employer is ok with releasing my
extensions back to the rake community.
The changes to Rake itself I'll certainly give out - but they were
simple.  :)

-----Original Message-----
From: rake-devel-bounces at rubyforge.org
[mailto:rake-devel-bounces at rubyforge.org] On Behalf Of Martin DeMello
Sent: Tuesday, February 03, 2004 3:54 PM
To: Rake Development and Discussion
Subject: Re: [Rake-devel] hello

--- Jim Weirich <jweirich at one.net> wrote:
> What are you interested in working on? I can make suggestions if you
like.

I'm currently interested in making common tasks as easy and terse as
possible, and as a longer term goal, working on a plugin framework (if
we need one, which is not obvious to me - it might be possible to do
plugins as normal ruby modules). 

Some questions: 

What's the rake equivalent to ant's **/ (globs over all the directories
in the tree whose root you supply)?

What's the philosophy behind recursive rakefiles? Good? Bad? User issue
that rake itself shall not address?

martin

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
_______________________________________________
Rake-devel mailing list
Rake-devel at rubyforge.org
http://rubyforge.org/mailman/listinfo/rake-devel





More information about the Rake-devel mailing list