Project Notes
General Overview
The proposed system will have two major parts, ModuleBuilder, a class, and rbuildmaker, a script for creating a barebones library package. Included then in every barebones library will be a rBuild.rb script.
Proposed ModuleBuilder Features
- Complete set of targets (test, clean, docs, dist, cvs-stuff, &c.).
- Provide targets also for the maintainence of the ModuleBuilder aspects of a library, such as updating MANIFEST and CHANGES.
- Ability to install multiple versions of the same library, with symlinks in the vein of .rb -> .rb.MAJOR -> .rb.MAJOR.MINOR.
- Programmatic and command-line interface.
- Easy access to the system specs and module config information.
- Will not use make.
- I18n support built in.
- Facilitate uninstall by having #install return the list of all files that were affected and how.
- Isolate all work in an 'rlib' dir.
- Sophisticated test target.
- Dependency checking and eventually installing.
- Improved mkmf-ish features for configuring C libraries.
- Provide mixins for the major types of libraries - Ruby, C, CPP, &c. Make sure they can be mixed in concurrently.
- Easy way to define new targets/redefine existing targets - such as def [target]....
- Offer functions to library authors to help configure their rBuild.rb file.
- Allow customizable defaults through use of a .rbmrc configuration file.
- Multiple source directories/user configurable source location. Thanks to Mathieu Bouchard and the rest of -core for the suggestion.
- Compliance with standard documentation placing, once a standard is adopted. Thanks to Mathieu Bouchard and the rest of -core for the suggestion.
rBuild.rb Responsibilities
- To define a subclass of the ModuleBuilder class specific to library to be installed.
- To configure the library's relevant information, such as name, version, liscense, &c.
- When run as a script, to behave like a makefile - taking targets as arguments and performing them sequentially, offering help on using the script, &c.
- Offer a ModuleBuilder class method that requires the rBuild.rb file and returns a list of all ModuleBuilder subclasses defined within that file, allowing for the programmatic interface to a library's installation configuration.
- Any pre-configuration steps, such as dependency checking, will be performed only on the first call of rBuild.rb and serialized into a .rBuild file for use on later calls.
rbuildmaker Features
- Interactive script to get the vital information about a library-to-be.
- For now, assuming library Foo, creates the following:
- lib/
- lib/Foo.rb
- test/
- test/00_require.test.rb
- doc/
- INSTALL
- MANIFEST
- CHANGES
- LICENSE
- README
- rBuild.rb
- test.rb
- Preconfigure rBuild.rb with the basic information about the library, as supplied by the user during the initial interactive setup.
- Where possible, offer useful default templates in the created files.
Sequence of Action
This is the sequence of events that must happen when the BuildMaker is invoked:
- The BuildMaker::build method is called on the BuildMaker subclass.
- If there is a saved (configured) version of the build object in
the current directory that is newer than the rBuild.rb script, the
BuildMaker object is loaded from it. If no such file exists, or the
file exists, but is older than rBuild.rb, a new BuildMaker object is
instantiated:
- All system information is gathered (rbconfig)
- All module information is gathered
This document is valid XHTML/1.1 and uses valid CSS. It might look funny to you, since you're not using a browser which (correctly) supports CSS.
Copyright © 2002, 2003 The FærieMUD Consortium.